diff options
Diffstat (limited to 'networking/telnet.c')
-rw-r--r-- | networking/telnet.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/networking/telnet.c b/networking/telnet.c index 207732b72..2587193e2 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -644,18 +644,15 @@ static int getport(char * p) | |||
644 | static struct in_addr getserver(char * host) | 644 | static struct in_addr getserver(char * host) |
645 | { | 645 | { |
646 | struct in_addr addr; | 646 | struct in_addr addr; |
647 | 647 | ||
648 | struct hostent * he; | 648 | struct hostent * he; |
649 | if ((he = gethostbyname(host)) == NULL) | 649 | he = xgethostbyname(host); |
650 | { | ||
651 | error_msg_and_die("%s: Unknown host", host); | ||
652 | } | ||
653 | memcpy(&addr, he->h_addr, sizeof addr); | 650 | memcpy(&addr, he->h_addr, sizeof addr); |
654 | 651 | ||
655 | TRACE(1, ("addr: %s\n", inet_ntoa(addr))); | 652 | TRACE(1, ("addr: %s\n", inet_ntoa(addr))); |
656 | 653 | ||
657 | return addr; | 654 | return addr; |
658 | } | 655 | } |
659 | 656 | ||
660 | static int create_socket() | 657 | static int create_socket() |
661 | { | 658 | { |