diff options
author | Björn Jacke <bj@sernet.de> | 2010-01-06 21:32:35 +0100 |
---|---|---|
committer | Björn Jacke <bj@sernet.de> | 2010-01-07 00:49:57 +0100 |
commit | c5f24c3eacf8892270702eeb0e1e037a0a1b4dde (patch) | |
tree | 7c1fefbc59c868a509050510e4f1710412080a60 | |
parent | c1c7b6cecb848c35c2cead332483ce117552d6bc (diff) | |
download | samba-c5f24c3eacf8892270702eeb0e1e037a0a1b4dde.tar.gz samba-c5f24c3eacf8892270702eeb0e1e037a0a1b4dde.tar.bz2 samba-c5f24c3eacf8892270702eeb0e1e037a0a1b4dde.zip |
s3:lib/time: remoce null_mtime() - use null_time()
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/lib/time.c | 15 |
2 files changed, 2 insertions, 14 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index af5e564e4b..5b16120294 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -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); diff --git a/source3/lib/time.c b/source3/lib/time.c index 7a8b1eb9a7..28ab4db18b 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -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); @@ -739,17 +739,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. ****************************************************************************/ |