aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util-linux/rdate.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index a62591914..960df25d2 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -95,10 +95,7 @@ int rdate_main(int argc UNUSED_PARAM, char **argv)
95 */ 95 */
96 96
97 if (!(flags & 2)) { /* no -p (-s may be present) */ 97 if (!(flags & 2)) { /* no -p (-s may be present) */
98 time_t current_time; 98 if (time(NULL) == remote_time)
99
100 time(&current_time);
101 if (current_time == remote_time)
102 bb_error_msg("current time matches remote time"); 99 bb_error_msg("current time matches remote time");
103 else 100 else
104 if (stime(&remote_time) < 0) 101 if (stime(&remote_time) < 0)