diff options
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/nfsmount.c | 4 | ||||
| -rw-r--r-- | util-linux/rdate.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c index a62df3272..90cf9fb1b 100644 --- a/util-linux/nfsmount.c +++ b/util-linux/nfsmount.c | |||
| @@ -335,7 +335,7 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
| 335 | #endif | 335 | #endif |
| 336 | { | 336 | { |
| 337 | if ((hp = gethostbyname(hostname)) == NULL) { | 337 | if ((hp = gethostbyname(hostname)) == NULL) { |
| 338 | error_msg("can't get address for %s", hostname); | 338 | herror_msg("%s", hostname); |
| 339 | goto fail; | 339 | goto fail; |
| 340 | } else { | 340 | } else { |
| 341 | if (hp->h_length > sizeof(struct in_addr)) { | 341 | if (hp->h_length > sizeof(struct in_addr)) { |
| @@ -580,7 +580,7 @@ int nfsmount(const char *spec, const char *node, int *flags, | |||
| 580 | mount_server_addr.sin_addr.s_addr = inet_addr(hostname); | 580 | mount_server_addr.sin_addr.s_addr = inet_addr(hostname); |
| 581 | } else { | 581 | } else { |
| 582 | if ((hp = gethostbyname(mounthost)) == NULL) { | 582 | if ((hp = gethostbyname(mounthost)) == NULL) { |
| 583 | error_msg("can't get address for %s", hostname); | 583 | herror_msg("%s", mounthost); |
| 584 | goto fail; | 584 | goto fail; |
| 585 | } else { | 585 | } else { |
| 586 | if (hp->h_length > sizeof(struct in_addr)) { | 586 | if (hp->h_length > sizeof(struct in_addr)) { |
diff --git a/util-linux/rdate.c b/util-linux/rdate.c index ead1e7c7d..8deb35d14 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c | |||
| @@ -45,8 +45,7 @@ static time_t askremotedate(const char *host) | |||
| 45 | unsigned long int nett, localt; | 45 | unsigned long int nett, localt; |
| 46 | int fd; | 46 | int fd; |
| 47 | 47 | ||
| 48 | if (!(h = gethostbyname(host))) /* get the IP addr */ | 48 | h = xgethostbyname(host); /* get the IP addr */ |
| 49 | perror_msg_and_die("%s", host); | ||
| 50 | 49 | ||
| 51 | if ((tserv = getservbyname("time", "tcp")) == NULL) /* find port # */ | 50 | if ((tserv = getservbyname("time", "tcp")) == NULL) /* find port # */ |
| 52 | perror_msg_and_die("%s", "time"); | 51 | perror_msg_and_die("%s", "time"); |
