diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-20 16:03:48 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-20 16:03:48 +0100 |
commit | 179e88bec91cfe58096900dc5509a080ff37b083 (patch) | |
tree | 069b8a997ea753191155630a2c4f8568e14df915 /networking | |
parent | 19e695ebadda206d1e0fbefa59ed8fabee0d0f64 (diff) | |
download | busybox-w32-179e88bec91cfe58096900dc5509a080ff37b083.tar.gz busybox-w32-179e88bec91cfe58096900dc5509a080ff37b083.tar.bz2 busybox-w32-179e88bec91cfe58096900dc5509a080ff37b083.zip |
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>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/inetd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/inetd.c b/networking/inetd.c index 4d0ab2e0d..612284e76 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -1677,7 +1677,7 @@ static uint32_t machtime(void) | |||
1677 | struct timeval tv; | 1677 | struct timeval tv; |
1678 | 1678 | ||
1679 | gettimeofday(&tv, NULL); | 1679 | gettimeofday(&tv, NULL); |
1680 | return htonl((uint32_t)(tv.tv_sec + 2208988800)); | 1680 | return htonl((uint32_t)(tv.tv_sec + 2208988800U)); |
1681 | } | 1681 | } |
1682 | /* ARGSUSED */ | 1682 | /* ARGSUSED */ |
1683 | static void FAST_FUNC machtime_stream(int s, servtab_t *sep UNUSED_PARAM) | 1683 | static void FAST_FUNC machtime_stream(int s, servtab_t *sep UNUSED_PARAM) |