diff options
Diffstat (limited to 'libbb/perror_msg_and_die.c')
-rw-r--r-- | libbb/perror_msg_and_die.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libbb/perror_msg_and_die.c b/libbb/perror_msg_and_die.c index 3a06b654b..90f56e04c 100644 --- a/libbb/perror_msg_and_die.c +++ b/libbb/perror_msg_and_die.c | |||
@@ -14,7 +14,11 @@ void bb_perror_msg_and_die(const char *s, ...) | |||
14 | va_list p; | 14 | va_list p; |
15 | 15 | ||
16 | va_start(p, s); | 16 | va_start(p, s); |
17 | bb_vperror_msg(s, p); | 17 | /* Guard against "<error message>: Success" */ |
18 | if (!errno) | ||
19 | bb_verror_msg(s, p, NULL); | ||
20 | else | ||
21 | bb_vperror_msg(s, p); | ||
18 | va_end(p); | 22 | va_end(p); |
19 | xfunc_die(); | 23 | xfunc_die(); |
20 | } | 24 | } |