Do not print herror message, if w -n gethostname failed to be 100%
compatible with any program Suggested by: peter
This commit is contained in:
+1
-2
@@ -331,8 +331,7 @@ main(argc, argv)
|
||||
|
||||
memmove(&in, hp->h_addr, sizeof(in));
|
||||
p = inet_ntoa(in);
|
||||
} else
|
||||
herror("gethostbyname");
|
||||
}
|
||||
}
|
||||
if (x) {
|
||||
(void)snprintf(buf, sizeof(buf), "%s:%.*s", p,
|
||||
|
||||
Reference in New Issue
Block a user