trivial code shrink
function old new delta rdate_main 246 251 +5 show_entry 291 287 -4 daytime_stream 44 39 -5 packed_usage 30176 30168 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 5/-17) Total: -12 bytes text data bss dec hex filename 929453 932 17684 948069 e7765 busybox_old 929411 932 17684 948027 e773b busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -11,9 +11,9 @@
|
||||
//usage:#define rdate_trivial_usage
|
||||
//usage: "[-sp] HOST"
|
||||
//usage:#define rdate_full_usage "\n\n"
|
||||
//usage: "Get and possibly set the system date/time from a remote HOST\n"
|
||||
//usage: "\n -s Set the system date/time (default)"
|
||||
//usage: "\n -p Print the date/time"
|
||||
//usage: "Get and possibly set system time from a remote HOST\n"
|
||||
//usage: "\n -s Set system time (default)"
|
||||
//usage: "\n -p Print time"
|
||||
|
||||
#include "libbb.h"
|
||||
|
||||
@ -36,7 +36,7 @@ static time_t askremotedate(const char *host)
|
||||
fd = create_and_connect_stream_or_die(host, bb_lookup_port("time", "tcp", 37));
|
||||
|
||||
if (safe_read(fd, &nett, 4) != 4) /* read time from server */
|
||||
bb_error_msg_and_die("%s did not send the complete time", host);
|
||||
bb_error_msg_and_die("%s: %s", host, "short read");
|
||||
if (ENABLE_FEATURE_CLEAN_UP)
|
||||
close(fd);
|
||||
|
||||
|
Reference in New Issue
Block a user