summaryrefslogtreecommitdiff
path: root/networking/nc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/nc.c')
-rw-r--r--networking/nc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/nc.c b/networking/nc.c
index b58bd6a..5335872 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -91,8 +91,7 @@ int nc_main(int argc, char **argv)
close(sfd);
sfd = tmpfd;
} else {
- if ((hostinfo = gethostbyname(argv[optind])) == NULL)
- error_msg_and_die("cannot resolve %s\n", argv[optind]);
+ hostinfo = xgethostbyname(argv[optind]);
address.sin_addr = *(struct in_addr *) *hostinfo->h_addr_list;
address.sin_port = htons(atoi(argv[optind+1]));