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-w32-5e618ff4393019ee24765877d49cb9001f7df992.tar.gz busybox-w32-5e618ff4393019ee24765877d49cb9001f7df992.tar.bz2 busybox-w32-5e618ff4393019ee24765877d49cb9001f7df992.zip |
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 @@ | |||
10 | #include <netdb.h> | 10 | #include <netdb.h> |
11 | #include "libbb.h" | 11 | #include "libbb.h" |
12 | 12 | ||
13 | |||
14 | struct hostent *xgethostbyname(const char *name) | 13 | struct hostent *xgethostbyname(const char *name) |
15 | { | 14 | { |
16 | struct hostent *retval; | 15 | struct hostent *retval = gethostbyname(name); |
17 | 16 | if (!retval) | |
18 | if ((retval = gethostbyname(name)) == NULL) | ||
19 | bb_herror_msg_and_die("%s", name); | 17 | bb_herror_msg_and_die("%s", name); |
20 | |||
21 | return retval; | 18 | return retval; |
22 | } | 19 | } |