diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-09-29 18:17:25 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-09-29 18:17:25 +0200 |
commit | 6f97b30a904407c1f1701d937d9258ca9175c6ab (patch) | |
tree | 093a86cb555fb3e7f365cea21095a7df8d5dce77 /editors | |
parent | f625836e6059d307e951a60b60f1c9ed259ee983 (diff) | |
download | busybox-w32-6f97b30a904407c1f1701d937d9258ca9175c6ab.tar.gz busybox-w32-6f97b30a904407c1f1701d937d9258ca9175c6ab.tar.bz2 busybox-w32-6f97b30a904407c1f1701d937d9258ca9175c6ab.zip |
use %m printf specifier where appropriate
function old new delta
out 85 75 -10
udhcpd_main 1472 1461 -11
open_stdio_to_tty 98 85 -13
init_exec 245 232 -13
udhcpc_main 2763 2749 -14
do_cmd 4771 4755 -16
status_line_bold_errno 32 14 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-95) Total: -95 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/vi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/vi.c b/editors/vi.c index 60c73c0eb..cdfb27cc5 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -1038,7 +1038,7 @@ static void colon(char *buf) | |||
1038 | } | 1038 | } |
1039 | if (cnt < 0) { | 1039 | if (cnt < 0) { |
1040 | if (cnt == -1) | 1040 | if (cnt == -1) |
1041 | status_line_bold("Write error: %s", strerror(errno)); | 1041 | status_line_bold("Write error: "STRERROR_FMT STRERROR_ERRNO); |
1042 | } else { | 1042 | } else { |
1043 | modified_count = 0; | 1043 | modified_count = 0; |
1044 | last_modified_count = -1; | 1044 | last_modified_count = -1; |
@@ -3131,7 +3131,7 @@ static void status_line_bold(const char *format, ...) | |||
3131 | 3131 | ||
3132 | static void status_line_bold_errno(const char *fn) | 3132 | static void status_line_bold_errno(const char *fn) |
3133 | { | 3133 | { |
3134 | status_line_bold("'%s' %s", fn, strerror(errno)); | 3134 | status_line_bold("'%s' "STRERROR_FMT, fn STRERROR_ERRNO); |
3135 | } | 3135 | } |
3136 | 3136 | ||
3137 | // format status buffer | 3137 | // format status buffer |
@@ -4066,7 +4066,7 @@ static void do_cmd(int c) | |||
4066 | cnt = file_write(current_filename, text, end - 1); | 4066 | cnt = file_write(current_filename, text, end - 1); |
4067 | if (cnt < 0) { | 4067 | if (cnt < 0) { |
4068 | if (cnt == -1) | 4068 | if (cnt == -1) |
4069 | status_line_bold("Write error: %s", strerror(errno)); | 4069 | status_line_bold("Write error: "STRERROR_FMT STRERROR_ERRNO); |
4070 | } else if (cnt == (end - 1 - text + 1)) { | 4070 | } else if (cnt == (end - 1 - text + 1)) { |
4071 | editing = 0; | 4071 | editing = 0; |
4072 | } | 4072 | } |