aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-21 20:35:22 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-21 20:35:22 +0000
commit5e618ff4393019ee24765877d49cb9001f7df992 (patch)
treea2f68656f32ff5ec22510a1a9048e522c32b4f2d /libbb
parent7ca3921e5e8aa64533d4d7a678046676ae6574ec (diff)
downloadbusybox-5e618ff4393019ee24765877d49cb9001f7df992.tar.gz
xgethostbyname: more readable
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xgethostbyname.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libbb/xgethostbyname.c b/libbb/xgethostbyname.c
index 0bbe18da2..c3158c339 100644
--- a/libbb/xgethostbyname.c
+++ b/libbb/xgethostbyname.c
@@ -10,13 +10,10 @@
#include <netdb.h>
#include "libbb.h"
-
struct hostent *xgethostbyname(const char *name)
{
- struct hostent *retval;
-
- if ((retval = gethostbyname(name)) == NULL)
+ struct hostent *retval = gethostbyname(name);
+ if (!retval)
bb_herror_msg_and_die("%s", name);
-
return retval;
}