diff options
author | Tim Potter <tpot@samba.org> | 2005-08-02 20:44:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:00:22 -0500 |
commit | dcc74371388d280d8ee5130a04e1594ae88d19b3 (patch) | |
tree | 65f9785675aac3614b14904668386d8c17229f45 /source | |
parent | 04a551f0a4d321f5e1a7af33468160e2c7839af8 (diff) | |
download | samba-dcc74371388d280d8ee5130a04e1594ae88d19b3.tar.gz samba-dcc74371388d280d8ee5130a04e1594ae88d19b3.tar.xz samba-dcc74371388d280d8ee5130a04e1594ae88d19b3.zip |
r8946: Some casts to fix warnings when time_t is an unsigned type. Fixes
bugzilla #1888 and #1894.
Diffstat (limited to 'source')
-rw-r--r-- | source/lib/time.c | 6 | ||||
-rw-r--r-- | source/nmbd/nmbd_workgroupdb.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/lib/time.c b/source/lib/time.c index f7b0aefe4fe..5e0f5646fca 100644 --- a/source/lib/time.c +++ b/source/lib/time.c @@ -366,7 +366,7 @@ time_t nt_time_to_unix_abs(NTTIME *nt) return(0); if (nt->high==0x80000000 && nt->low==0) - return -1; + return (time_t)-1; /* reverse the time */ /* it's a negative value, turn it to positive */ @@ -421,7 +421,7 @@ void unix_to_nt_time(NTTIME *nt, time_t t) nt->high = 0x7fffffff; return; } - if (t == -1) { + if (t == (time_t)-1) { nt->low = 0xffffffff; nt->high = 0xffffffff; return; @@ -462,7 +462,7 @@ void unix_to_nt_time_abs(NTTIME *nt, time_t t) return; } - if (t == -1) { + if (t == (time_t)-1) { /* that's what NT uses for infinite */ nt->low = 0x0; nt->high = 0x80000000; diff --git a/source/nmbd/nmbd_workgroupdb.c b/source/nmbd/nmbd_workgroupdb.c index 917116dd077..335d5220310 100644 --- a/source/nmbd/nmbd_workgroupdb.c +++ b/source/nmbd/nmbd_workgroupdb.c @@ -322,7 +322,7 @@ void expire_workgroups_and_servers(time_t t) expire_servers(work, t); if ((work->serverlist == NULL) && (work->death_time != PERMANENT_TTL) && - ((t == -1) || (work->death_time < t))) { + ((t == (time_t)-1) || (work->death_time < t))) { DEBUG(3,("expire_workgroups_and_servers: Removing timed out workgroup %s\n", work->work_group)); remove_workgroup_from_subnet(subrec, work); |