diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-21 20:35:22 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-21 20:35:22 +0000 |
commit | 5e618ff4393019ee24765877d49cb9001f7df992 (patch) | |
tree | a2f68656f32ff5ec22510a1a9048e522c32b4f2d | |
parent | 7ca3921e5e8aa64533d4d7a678046676ae6574ec (diff) | |
download | busybox-5e618ff4393019ee24765877d49cb9001f7df992.tar.gz |
xgethostbyname: more readable
-rw-r--r-- | libbb/xgethostbyname.c | 7 |
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; } |