mirror of
https://github.com/sheumann/hush.git
synced 2024-11-19 23:31:39 +00:00
rdate: code shrink
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
0ccae4d8b3
commit
39f82d4309
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user