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:
0ccae4d
)
rdate: code shrink
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 11 Jun 2012 12:57:29 +0000
(14:57 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 11 Jun 2012 12:57:29 +0000
(14:57 +0200)
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 2ca585fec2922ea618a297600b841a88226b5251..6e35cd5190bcbc595a7dd1cc9de19e5196602a6b 100644
(file)
--- a/
util-linux/rdate.c
+++ b/
util-linux/rdate.c
@@
-61,7
+61,7
@@
int rdate_main(int argc UNUSED_PARAM, char **argv)
remote_time = askremotedate(argv[optind]);
- if (!(flags & 2)) {
+ if (!(flags & 2)) {
/* no -p (-s may be present) */
time_t current_time;
time(¤t_time);
@@
-72,7
+72,7
@@
int rdate_main(int argc UNUSED_PARAM, char **argv)
bb_perror_msg_and_die("can't set time of day");
}
- if (
(flags & 2) || !(flags & 1))
+ if (
flags != 1) /* not lone -s */
printf("%s", ctime(&remote_time));
return EXIT_SUCCESS;