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>
diff --git a/networking/inetd.c b/networking/inetd.c
index 4d0ab2e..612284e 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1677,7 +1677,7 @@
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)