← Commit list

5e618ff43

Denis Vlasenko
Denis Vlasenko
2006-11-21
FAILED Duration: 3s

Subject

xgethostbyname: more readable

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/xgethostbyname.c+2 -5
@@ -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;
}