projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
179e88b
)
rdate: time(NULL) is shorter than time(&var)
author
Denys Vlasenko
<vda.linux@googlemail.com>
Fri, 20 Jan 2017 15:07:14 +0000
(16:07 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Fri, 20 Jan 2017 15:07:14 +0000
(16:07 +0100)
function old new delta
rdate_main 251 246 -5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/rdate.c
patch
|
blob
|
history
diff --git
a/util-linux/rdate.c
b/util-linux/rdate.c
index a625919140c39c1a13b7fc29b2d7767b31cbe428..960df25d229a0f6087f8b9ab6aca552b8e206c85 100644
(file)
--- a/
util-linux/rdate.c
+++ b/
util-linux/rdate.c
@@
-95,10
+95,7
@@
int rdate_main(int argc UNUSED_PARAM, char **argv)
*/
if (!(flags & 2)) { /* no -p (-s may be present) */
- time_t current_time;
-
- time(¤t_time);
- if (current_time == remote_time)
+ if (time(NULL) == remote_time)
bb_error_msg("current time matches remote time");
else
if (stime(&remote_time) < 0)