summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-30 19:26:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:31 -0500
commit5c9344fa4cb0d1796ca7ea819080d344f6238994 (patch)
tree08750299073adc63208ccd4b0e8fd461d37889ef /source3/lib
parenta4e3c20deb72ef4ddff5e42684462bc3c00176c4 (diff)
downloadsamba-5c9344fa4cb0d1796ca7ea819080d344f6238994.tar.gz
samba-5c9344fa4cb0d1796ca7ea819080d344f6238994.tar.bz2
samba-5c9344fa4cb0d1796ca7ea819080d344f6238994.zip
r21060: Start refactoring out the non-return case statements
into functions. Jeremy. (This used to be commit 461db3c8ed045cac70eccf3200bf9163dbce5826)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/time.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c
index f45a8d3e84..403fb0594d 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -943,7 +943,7 @@ void dos_filetime_timespec(struct timespec *tsp)
localtime).
********************************************************************/
-static time_t make_unix_date(void *date_ptr, int zone_offset)
+static time_t make_unix_date(const void *date_ptr, int zone_offset)
{
uint32 dos_date=0;
struct tm t;
@@ -970,7 +970,7 @@ static time_t make_unix_date(void *date_ptr, int zone_offset)
Like make_unix_date() but the words are reversed.
********************************************************************/
-static time_t make_unix_date2(void *date_ptr, int zone_offset)
+static time_t make_unix_date2(const void *date_ptr, int zone_offset)
{
uint32 x,x2;
@@ -978,7 +978,7 @@ static time_t make_unix_date2(void *date_ptr, int zone_offset)
x2 = ((x&0xFFFF)<<16) | ((x&0xFFFF0000)>>16);
SIVAL(&x,0,x2);
- return(make_unix_date((void *)&x, zone_offset));
+ return(make_unix_date((const void *)&x, zone_offset));
}
/*******************************************************************
@@ -986,7 +986,7 @@ static time_t make_unix_date2(void *date_ptr, int zone_offset)
these generally arrive as localtimes, with corresponding DST.
******************************************************************/
-static time_t make_unix_date3(void *date_ptr, int zone_offset)
+static 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)) {
@@ -995,17 +995,17 @@ static time_t make_unix_date3(void *date_ptr, int zone_offset)
return(t);
}
-time_t srv_make_unix_date(void *date_ptr)
+time_t srv_make_unix_date(const void *date_ptr)
{
return make_unix_date(date_ptr, server_zone_offset);
}
-time_t srv_make_unix_date2(void *date_ptr)
+time_t srv_make_unix_date2(const void *date_ptr)
{
return make_unix_date2(date_ptr, server_zone_offset);
}
-time_t srv_make_unix_date3(void *date_ptr)
+time_t srv_make_unix_date3(const void *date_ptr)
{
return make_unix_date3(date_ptr, server_zone_offset);
}
@@ -1026,7 +1026,7 @@ time_t convert_timespec_to_time_t(struct timespec ts)
will be returned as (time_t)-1, whereas nt_time_to_unix returns 0 in this case.
****************************************************************************/
-struct timespec interpret_long_date(char *p)
+struct timespec interpret_long_date(const char *p)
{
NTTIME nt;
nt = IVAL(p,0) + ((uint64_t)IVAL(p,4) << 32);