rdate: make it do something remotely sane, facing 32-bit time overflow
function old new delta rdate_main 251 254 +3 packed_usage 31029 31023 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -1677,7 +1677,7 @@ static uint32_t machtime(void)
|
||||
struct timeval tv;
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
return htonl((uint32_t)(tv.tv_sec + 2208988800));
|
||||
return htonl((uint32_t)(tv.tv_sec + 2208988800U));
|
||||
}
|
||||
/* ARGSUSED */
|
||||
static void FAST_FUNC machtime_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
|
Reference in New Issue
Block a user