rdate: time(NULL) is shorter than time(&var)
function old new delta rdate_main 251 246 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
179e88bec9
commit
6e511393f9
@ -95,10 +95,7 @@ int rdate_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (!(flags & 2)) { /* no -p (-s may be present) */
|
if (!(flags & 2)) { /* no -p (-s may be present) */
|
||||||
time_t current_time;
|
if (time(NULL) == remote_time)
|
||||||
|
|
||||||
time(¤t_time);
|
|
||||||
if (current_time == remote_time)
|
|
||||||
bb_error_msg("current time matches remote time");
|
bb_error_msg("current time matches remote time");
|
||||||
else
|
else
|
||||||
if (stime(&remote_time) < 0)
|
if (stime(&remote_time) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user