From 5e618ff4393019ee24765877d49cb9001f7df992 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 21 Nov 2006 20:35:22 +0000 Subject: [PATCH] xgethostbyname: more readable --- libbb/xgethostbyname.c | 7 ++----- 1 file 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 #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; } -- 2.25.1