diff options
author | Denys Vlasenko | 2023-06-12 10:19:29 +0200 |
---|---|---|
committer | Denys Vlasenko | 2023-06-12 10:19:29 +0200 |
commit | 4bd70463c7e7511aea9de58876f0beacbcec1779 (patch) | |
tree | ad700e6ec59309e998a27d1cda6730f7b968688b /libbb/verror_msg.c | |
parent | 2ca39ffd447ca874fcea933194829717d5573247 (diff) | |
download | busybox-4bd70463c7e7511aea9de58876f0beacbcec1779.zip busybox-4bd70463c7e7511aea9de58876f0beacbcec1779.tar.gz |
libbb: pass "" rather than NULL as format string in _nomsg functions
function old new delta
bb_perror_nomsg_and_die 9 10 +1
bb_perror_nomsg 9 10 +1
bb_verror_msg 480 469 -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 2/-11) Total: -9 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/verror_msg.c')
-rw-r--r-- | libbb/verror_msg.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c index 71512ae..74b608f 100644 --- a/libbb/verror_msg.c +++ b/libbb/verror_msg.c @@ -26,9 +26,6 @@ void FAST_FUNC bb_verror_msg(const char *s, va_list p, const char* strerr) if (!logmode) return; - if (!s) /* nomsg[_and_die] uses NULL fmt */ - s = ""; /* some libc don't like printf(NULL) */ - applet_len = strlen(applet_name) + 2; /* "applet: " */ strerr_len = strerr ? strlen(strerr) : 0; msgeol_len = strlen(msg_eol); @@ -116,9 +113,6 @@ void FAST_FUNC bb_verror_msg(const char *s, va_list p, const char* strerr) if (!logmode) return; - if (!s) /* nomsg[_and_die] uses NULL fmt */ - s = ""; /* some libc don't like printf(NULL) */ - /* Prevent "derefing type-punned ptr will break aliasing rules" */ used = vasprintf((char**)(void*)msgptr, s, p); if (used < 0) |