From c1fe19d4c1db610692365472a90f4661e48449c1 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 9 Oct 2000 20:06:30 +0000 Subject: Bug ugly formatting update --- libc/inet/rpc/get_myaddress.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'libc/inet/rpc/get_myaddress.c') diff --git a/libc/inet/rpc/get_myaddress.c b/libc/inet/rpc/get_myaddress.c index cbfc05b8d..95ddc71b4 100644 --- a/libc/inet/rpc/get_myaddress.c +++ b/libc/inet/rpc/get_myaddress.c @@ -28,7 +28,9 @@ * Mountain View, California 94043 */ #if !defined(lint) && defined(SCCSIDS) -static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro"; +static char sccsid[] = + + "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro"; #endif /* @@ -51,7 +53,7 @@ static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro"; /* DO use gethostbyname because it's portable */ #include get_myaddress(addr) - struct sockaddr_in *addr; +struct sockaddr_in *addr; { char localhost[256 + 1]; struct hostent *hp; @@ -70,7 +72,7 @@ get_myaddress(addr) * don't use gethostbyname, which would invoke yellow pages */ get_myaddress(addr) - struct sockaddr_in *addr; +struct sockaddr_in *addr; { int s; char buf[BUFSIZ]; @@ -79,25 +81,25 @@ get_myaddress(addr) int len; if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - perror("get_myaddress: socket"); - exit(1); + perror("get_myaddress: socket"); + exit(1); } - ifc.ifc_len = sizeof (buf); + ifc.ifc_len = sizeof(buf); ifc.ifc_buf = buf; - if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) { + if (ioctl(s, SIOCGIFCONF, (char *) &ifc) < 0) { perror("get_myaddress: ioctl (get interface configuration)"); exit(1); } ifr = ifc.ifc_req; for (len = ifc.ifc_len; len; len -= sizeof ifreq) { ifreq = *ifr; - if (ioctl(s, SIOCGIFFLAGS, (char *)&ifreq) < 0) { + if (ioctl(s, SIOCGIFFLAGS, (char *) &ifreq) < 0) { perror("get_myaddress: ioctl"); exit(1); } if ((ifreq.ifr_flags & IFF_UP) && - ifr->ifr_addr.sa_family == AF_INET) { - *addr = *((struct sockaddr_in *)&ifr->ifr_addr); + ifr->ifr_addr.sa_family == AF_INET) { + *addr = *((struct sockaddr_in *) &ifr->ifr_addr); addr->sin_port = htons(PMAPPORT); break; } -- cgit v1.2.3