Better error message when failing to resolve server name.
This commit is contained in:
parent
e651005e16
commit
b1bb8de8e2
1 changed files with 1 additions and 1 deletions
2
echoc.c
2
echoc.c
|
@ -111,7 +111,7 @@ main(int argc, char *argv[])
|
|||
hints.ai_socktype = SOCK_DGRAM;
|
||||
error = getaddrinfo(argv[0], "echo", &hints, &res0);
|
||||
if (error)
|
||||
errx(1, "%s", gai_strerror(error));
|
||||
errx(1, "%s: %s", argv[0], gai_strerror(error));
|
||||
|
||||
for (res = res0; res != NULL; res = res->ai_next) {
|
||||
sock = socket(res->ai_family, res->ai_socktype,
|
||||
|
|
Loading…
Add table
Reference in a new issue