s3:lib: make_unix_date2() is the same as pull_dos_date2()
authorStefan Metzmacher <metze@samba.org>
Wed, 26 Oct 2011 06:54:11 +0000 (08:54 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 26 Oct 2011 07:42:04 +0000 (09:42 +0200)
Except for a 'void *' vs. 'uint8_t *'.

As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.

metze

source3/lib/time.c

index 7d934645864e5e83f2eeef154198fc2aebb8fb6b..e66941e27c9c2749ad13bf86dedc7ab1d86ef0e6 100644 (file)
@@ -207,13 +207,7 @@ time_t make_unix_date(const void *date_ptr, int zone_offset)
 
 time_t make_unix_date2(const void *date_ptr, int zone_offset)
 {
-       uint32_t x,x2;
-
-       x = IVAL(date_ptr,0);
-       x2 = ((x&0xFFFF)<<16) | ((x&0xFFFF0000)>>16);
-       SIVAL(&x,0,x2);
-
-       return(make_unix_date((const void *)&x, zone_offset));
+       return pull_dos_date2(date_ptr, zone_offset);
 }
 
 /*******************************************************************