From f356f1bb5d54a1a768c1470b637b8c24e13b38f9 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Tue, 27 Jun 2000 18:02:12 +0000 Subject: [PATCH] style changes --- lib/lwres/lwinetaton.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/lwres/lwinetaton.c b/lib/lwres/lwinetaton.c index 4cd4ccd350..2068a922c7 100644 --- a/lib/lwres/lwinetaton.c +++ b/lib/lwres/lwinetaton.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; -static char rcsid[] = "$Id: lwinetaton.c,v 1.5 2000/06/21 22:20:14 tale Exp $"; +static char rcsid[] = "$Id: lwinetaton.c,v 1.6 2000/06/27 18:02:12 bwelling Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -98,6 +98,8 @@ lwres_net_aton(const char *cp, struct in_addr *addr) { lwres_uint8_t *pp = parts; int digit; + REQUIRE(cp != NULL); + c = *cp; for (;;) { /* @@ -107,14 +109,17 @@ lwres_net_aton(const char *cp, struct in_addr *addr) { */ if (!isdigit(c & 0xff)) return (0); - val = 0; base = 10; digit = 0; + val = 0; + base = 10; + digit = 0; if (c == '0') { c = *++cp; - if (c == 'x' || c == 'X') - base = 16, c = *++cp; - else { + if (c == 'x' || c == 'X') { + base = 16; + c = *++cp; + } else { base = 8; - digit = 1 ; + digit = 1; } } for (;;) {