From: Denis Vlasenko Date: Tue, 21 Nov 2006 20:35:22 +0000 (-0000) Subject: xgethostbyname: more readable X-Git-Tag: 1_4_0~361 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5e618ff4393019ee24765877d49cb9001f7df992;p=oweals%2Fbusybox.git xgethostbyname: more readable --- 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 #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; }