diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-01-06 23:27:53 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-01-06 23:27:53 +0000 |
commit | ec28fc7c4f3e136a38f361cf7ce2274452f0d849 (patch) | |
tree | 1c6a7ba85ddbb9ce7e5f0aed31271a494131e9ad /sunrpc | |
parent | f1813b562b7d4aebfde07f0991126e2de7a55d73 (diff) | |
download | glibc-ec28fc7c4f3e136a38f361cf7ce2274452f0d849.tar glibc-ec28fc7c4f3e136a38f361cf7ce2274452f0d849.tar.gz glibc-ec28fc7c4f3e136a38f361cf7ce2274452f0d849.tar.bz2 glibc-ec28fc7c4f3e136a38f361cf7ce2274452f0d849.zip |
(Finding Tokens in a String): Document XPG basename() and dirname(), aswell as GNU basename().
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/pmap_clnt.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sunrpc/pmap_clnt.c b/sunrpc/pmap_clnt.c index 05cfe2fa52..4db0f023b6 100644 --- a/sunrpc/pmap_clnt.c +++ b/sunrpc/pmap_clnt.c @@ -51,7 +51,7 @@ * interface. portmap caches interfaces, and on DHCP clients, * it could be that only loopback is started at this time. */ -static void +static bool_t __get_myaddress (struct sockaddr_in *addr) { int s; @@ -89,7 +89,7 @@ __get_myaddress (struct sockaddr_in *addr) *addr = *((struct sockaddr_in *) &ifr->ifr_addr); addr->sin_port = htons (PMAPPORT); __close (s); - return; + return TRUE; } ifr++; } @@ -99,6 +99,7 @@ __get_myaddress (struct sockaddr_in *addr) goto again; } __close (s); + return FALSE; } @@ -118,7 +119,8 @@ pmap_set (u_long program, u_long version, int protocol, u_short port) struct pmap parms; bool_t rslt; - __get_myaddress (&myaddress); + if (!__get_myaddress (&myaddress)) + return FALSE; client = clntudp_bufcreate (&myaddress, PMAPPROG, PMAPVERS, timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); if (client == (CLIENT *) NULL) @@ -152,7 +154,8 @@ pmap_unset (u_long program, u_long version) struct pmap parms; bool_t rslt; - __get_myaddress (&myaddress); + if (!__get_myaddress (&myaddress)) + return FALSE; client = clntudp_bufcreate (&myaddress, PMAPPROG, PMAPVERS, timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); if (client == (CLIENT *) NULL) |