s3:lib/time: remoce null_mtime() - use null_time()
authorBjörn Jacke <bj@sernet.de>
Wed, 6 Jan 2010 20:32:35 +0000 (21:32 +0100)
committerBjörn Jacke <bj@sernet.de>
Wed, 6 Jan 2010 23:49:57 +0000 (00:49 +0100)
source3/include/proto.h
source3/lib/time.c

index af5e564e4b250a3bd51a19c16e3df2ee359f591d..5b1612029481eb00b3db366cbb56985d874527eb 100644 (file)
@@ -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);
index 7a8b1eb9a7b485943dd7a1ee62a50cbe17532961..28ab4db18b7e9f2b2005460dfd1048bca6a3f68d 100644 (file)
@@ -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.