diff options
Diffstat (limited to 'nc.c')
-rw-r--r-- | nc.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -91,8 +91,7 @@ int nc_main(int argc, char **argv) | |||
91 | close(sfd); | 91 | close(sfd); |
92 | sfd = tmpfd; | 92 | sfd = tmpfd; |
93 | } else { | 93 | } else { |
94 | if ((hostinfo = gethostbyname(argv[optind])) == NULL) | 94 | hostinfo = xgethostbyname(argv[optind]); |
95 | error_msg_and_die("cannot resolve %s\n", argv[optind]); | ||
96 | 95 | ||
97 | address.sin_addr = *(struct in_addr *) *hostinfo->h_addr_list; | 96 | address.sin_addr = *(struct in_addr *) *hostinfo->h_addr_list; |
98 | address.sin_port = htons(atoi(argv[optind+1])); | 97 | address.sin_port = htons(atoi(argv[optind+1])); |