2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

style changes

This commit is contained in:
Brian Wellington
2000-06-27 18:02:12 +00:00
parent db118c5f26
commit f356f1bb5d

View File

@@ -70,7 +70,7 @@
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; 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 */ #endif /* LIBC_SCCS and not lint */
#include <config.h> #include <config.h>
@@ -98,6 +98,8 @@ lwres_net_aton(const char *cp, struct in_addr *addr) {
lwres_uint8_t *pp = parts; lwres_uint8_t *pp = parts;
int digit; int digit;
REQUIRE(cp != NULL);
c = *cp; c = *cp;
for (;;) { for (;;) {
/* /*
@@ -107,12 +109,15 @@ lwres_net_aton(const char *cp, struct in_addr *addr) {
*/ */
if (!isdigit(c & 0xff)) if (!isdigit(c & 0xff))
return (0); return (0);
val = 0; base = 10; digit = 0; val = 0;
base = 10;
digit = 0;
if (c == '0') { if (c == '0') {
c = *++cp; c = *++cp;
if (c == 'x' || c == 'X') if (c == 'x' || c == 'X') {
base = 16, c = *++cp; base = 16;
else { c = *++cp;
} else {
base = 8; base = 8;
digit = 1; digit = 1;
} }