From: Denys Vlasenko Date: Mon, 11 Jun 2012 12:57:29 +0000 (+0200) Subject: rdate: code shrink X-Git-Tag: 1_21_0~140 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=39f82d4309633815160a291bbf9fa83c21fb4a17;p=oweals%2Fbusybox.git rdate: code shrink Signed-off-by: Denys Vlasenko --- diff --git a/util-linux/rdate.c b/util-linux/rdate.c index 2ca585fec..6e35cd519 100644 --- 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;