mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3:lib/time: remoce null_mtime() - use null_time()
This commit is contained in:
parent
c1c7b6cecb
commit
c5f24c3eac
@ -1065,7 +1065,6 @@ time_t nt_time_to_unix_abs(const NTTIME *nt);
|
||||
time_t uint64s_nt_time_to_unix_abs(const uint64_t *src);
|
||||
void unix_timespec_to_nt_time(NTTIME *nt, struct timespec ts);
|
||||
void unix_to_nt_time_abs(NTTIME *nt, time_t t);
|
||||
bool null_mtime(time_t mtime);
|
||||
const char *time_to_asc(const time_t t);
|
||||
const char *display_time(NTTIME nttime);
|
||||
bool nt_time_is_set(const NTTIME *nt);
|
||||
|
@ -276,7 +276,7 @@ static void put_dos_date2(char *buf,int offset,time_t unixdate, int zone_offset)
|
||||
|
||||
static void put_dos_date3(char *buf,int offset,time_t unixdate, int zone_offset)
|
||||
{
|
||||
if (!null_mtime(unixdate)) {
|
||||
if (!null_time(unixdate)) {
|
||||
unixdate -= zone_offset;
|
||||
}
|
||||
SIVAL(buf,offset,unixdate);
|
||||
@ -396,7 +396,7 @@ time_t make_unix_date2(const void *date_ptr, int zone_offset)
|
||||
time_t make_unix_date3(const void *date_ptr, int zone_offset)
|
||||
{
|
||||
time_t t = (time_t)IVAL(date_ptr,0);
|
||||
if (!null_mtime(t)) {
|
||||
if (!null_time(t)) {
|
||||
t += zone_offset;
|
||||
}
|
||||
return(t);
|
||||
@ -738,17 +738,6 @@ void unix_to_nt_time_abs(NTTIME *nt, time_t t)
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
Check if it's a null mtime.
|
||||
****************************************************************************/
|
||||
|
||||
bool null_mtime(time_t mtime)
|
||||
{
|
||||
if (mtime == 0 || mtime == (time_t)0xFFFFFFFF || mtime == (time_t)-1)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Utility function that always returns a const string even if localtime
|
||||
and asctime fail.
|
||||
|
Loading…
Reference in New Issue
Block a user