Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 18016 invoked from network); 17 May 2005 08:30:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 May 2005 08:30:34 -0000 Received: (qmail 50640 invoked by uid 500); 16 May 2005 21:46:02 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 50607 invoked by uid 500); 16 May 2005 21:46:00 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 50582 invoked by uid 99); 16 May 2005 21:45:59 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 16 May 2005 14:45:58 -0700 Received: (qmail 25208 invoked by uid 65534); 16 May 2005 21:45:53 -0000 Message-ID: <20050516214553.25207.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: svn commit: r170462 - /apr/apr/trunk/network_io/unix/inet_pton.c Date: Mon, 16 May 2005 21:45:53 -0000 To: commits@apr.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.0-dev X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: wrowe Date: Mon May 16 14:45:52 2005 New Revision: 170462 URL: http://svn.apache.org/viewcvs?rev=3D170462&view=3Drev Log: Whitespace only - reindent to 4's Modified: apr/apr/trunk/network_io/unix/inet_pton.c Modified: apr/apr/trunk/network_io/unix/inet_pton.c URL: http://svn.apache.org/viewcvs/apr/apr/trunk/network_io/unix/inet_pton.= c?rev=3D170462&r1=3D170461&r2=3D170462&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- apr/apr/trunk/network_io/unix/inet_pton.c (original) +++ apr/apr/trunk/network_io/unix/inet_pton.c Mon May 16 14:45:52 2005 @@ -105,40 +105,40 @@ static int inet_pton4(const char *src, unsigned char *dst) { - static const char digits[] =3D "0123456789"; - int saw_digit, octets, ch; - unsigned char tmp[INADDRSZ], *tp; + static const char digits[] =3D "0123456789"; + int saw_digit, octets, ch; + unsigned char tmp[INADDRSZ], *tp; =20 - saw_digit =3D 0; - octets =3D 0; - *(tp =3D tmp) =3D 0; - while ((ch =3D *src++) !=3D '\0') { - const char *pch; + saw_digit =3D 0; + octets =3D 0; + *(tp =3D tmp) =3D 0; + while ((ch =3D *src++) !=3D '\0') { + const char *pch; =20 - if ((pch =3D strchr(digits, ch)) !=3D NULL) { - unsigned int new =3D *tp * 10 + (pch - digits); + if ((pch =3D strchr(digits, ch)) !=3D NULL) { + unsigned int new =3D *tp * 10 + (pch - digits); =20 - if (new > 255) - return (0); - *tp =3D new; - if (! saw_digit) { - if (++octets > 4) - return (0); - saw_digit =3D 1; - } - } else if (ch =3D=3D '.' && saw_digit) { - if (octets =3D=3D 4) - return (0); - *++tp =3D 0; - saw_digit =3D 0; - } else - return (0); - } - if (octets < 4) + if (new > 255) return (0); + *tp =3D new; + if (! saw_digit) { + if (++octets > 4) + return (0); + saw_digit =3D 1; + } + } else if (ch =3D=3D '.' && saw_digit) { + if (octets =3D=3D 4) + return (0); + *++tp =3D 0; + saw_digit =3D 0; + } else + return (0); + } + if (octets < 4) + return (0); =20 - memcpy(dst, tmp, INADDRSZ); - return (1); + memcpy(dst, tmp, INADDRSZ); + return (1); } =20 #if APR_HAVE_IPV6