The Samba-Bugzilla – Bug 1895
nmbd_serverlistdb - An unsigned time_t type should never be equal to -1
Last modified: 2004-10-08 19:52:44 UTC
In the module nmbd_serverlistdb,
In the routines expire_servers(),
A comparison is being made with a time_t type to see if it is -1.
On a platform where time_t is unsigned, it can never have a negative value.
Some C compilers have an extension where they will promote the -1 to be an
unsigned type with all bits set to make this work, but I would recommend putting
a cast of (time_t) on these comparisons just to make sure that these conversions
work, as from a logical point of view, any comparison of an unsigned value with
a negative number should always be false.
See bug 1888
Somehow I entered this bug in twice.
*** This bug has been marked as a duplicate of 1894 ***