From ab9c44b1a41c9a17cd0f8a8f1e5517756ccb8bf0 Mon Sep 17 00:00:00 2001
From: Denis Vlasenko <vda.linux@googlemail.com>
Date: Wed, 15 Aug 2007 20:07:53 +0000
Subject: v[hp]error_msg have 2-3 callsites only -> incorporate there.

---
 libbb/perror_msg_and_die.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

(limited to 'libbb/perror_msg_and_die.c')

diff --git a/libbb/perror_msg_and_die.c b/libbb/perror_msg_and_die.c
index 90f56e04c..15f46fc05 100644
--- a/libbb/perror_msg_and_die.c
+++ b/libbb/perror_msg_and_die.c
@@ -15,10 +15,7 @@ void bb_perror_msg_and_die(const char *s, ...)
 
 	va_start(p, s);
 	/* Guard against "<error message>: Success" */
-	if (!errno)
-		bb_verror_msg(s, p, NULL);
-	else
-		bb_vperror_msg(s, p);
+	bb_verror_msg(s, p, errno ? strerror(errno) : NULL);
 	va_end(p);
 	xfunc_die();
 }
-- 
cgit v1.2.3-55-g6feb