diff options
Diffstat (limited to 'lib/libc/rpc/get_myaddress.c')
| -rw-r--r-- | lib/libc/rpc/get_myaddress.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/lib/libc/rpc/get_myaddress.c b/lib/libc/rpc/get_myaddress.c index 84374ed27834..2adb6feeb467 100644 --- a/lib/libc/rpc/get_myaddress.c +++ b/lib/libc/rpc/get_myaddress.c @@ -30,7 +30,7 @@  #if defined(LIBC_SCCS) && !defined(lint)  /*static char *sccsid = "from: @(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/  /*static char *sccsid = "from: @(#)get_myaddress.c	2.1 88/07/29 4.0 RPCSRC";*/ -static char *rcsid = "$Id: get_myaddress.c,v 1.5 1996/11/22 23:37:08 pst Exp $"; +static char *rcsid = "$Id: get_myaddress.c,v 1.6 1996/12/30 14:26:28 peter Exp $";  #endif  /* @@ -62,7 +62,7 @@ get_myaddress(addr)  	struct sockaddr_in *addr;  {  	int s; -	char buf[BUFSIZ]; +	char buf[1024 * 8];  	struct ifconf ifc;  	struct ifreq ifreq, *ifr, *end;  	int loopback = 0, gotit = 0; @@ -105,5 +105,7 @@ again:  		goto again;  	}  	(void) close(s); +	if (gotit == 0)		/* still found nothing?? */ +		return (-1);  	return (0);  } | 
