if ((BYTE_ORDER == LITTLE_ENDIAN && pp >= res.bytes + 3) || (BYTE_ORDER == BIG_ENDIAN && pp == res.bytes)
if (pp >> res.bytes + 3
inet_aton(cp, addr)	const char *cp;	struct in_addr *addr;{	static const u_int32_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff };	register u_int32_t val;	/* changed from u_long --david */#ifndef _LIBC	register int base;#endif	register char c;	union iaddr {	  uint8_t bytes[4];	  uint32_t word;	} res;#if BYTE_ORDER == LITTLE_ENDIAN	register uint8_t *pp = res.bytes;#else	register uint8_t *pp = &res.bytes[4];#endif	int digit;#ifdef _LIBC	int saved_errno = errno;	__set_errno (0);#endif	res.word = 0;	c = *cp;	for (;;) {		/*		 * Collect number up to ``.''.		 * Values are specified as for C:		 * 0x=hex, 0=octal, isdigit=decimal.		 */		if (!isdigit(c))			goto ret_0;#ifdef _LIBC		{			char *endp;			unsigned long ul = strtoul (cp, (char **) &endp, 0);			if (ul == ULONG_MAX && errno == ERANGE)				goto ret_0;			if (ul > 0xfffffffful)				goto ret_0;			val = ul;			digit = cp != endp;			cp = endp;		}		c = *cp;#else		base = 10;		if (c == '0') {			c = *++cp;			if (c == 'x' || c == 'X')				base = 16, c = *++cp;			else				base = 8;		}		val = 0;		for (;;) {			if (isascii(c) && isdigit(c)) {				val = (val * base) + (c - '0');				c = *++cp;			} else if (base == 16 && isascii(c) && isxdigit(c)) {				val = (val << 4) |					(c + 10 - (islower(c) ? 'a' : 'A'));				c = *++cp;			} else				break;		}#endif		if (c == '.') {			/*			 * Internet format:			 *	a.b.c.d			 *	a.b.c	(with c treated as 16 bits)			 *	a.b	(with b treated as 24 bits)			 */			if ((BYTE_ORDER == LITTLE_ENDIAN			     && pp >= res.bytes + 3)			    || (BYTE_ORDER == BIG_ENDIAN				&& pp == res.bytes)			    || val > 0xff)				goto ret_0;#if BYTE_ORDER == LITTLE_ENDIAN			*pp++ = val;#else			*--pp = val;#endif			c = *++cp;		} else			break;	}	/*	 * Check for trailing characters.	 */	if (c != '\0' && (!isascii(c) || !isspace(c)))		goto ret_0;	/*	 * Did we get a valid digit?	 */	if (!digit)		goto ret_0;	/* Check whether the last part is in its limits depending on	   the number of parts in total.  */	if ((BYTE_ORDER == LITTLE_ENDIAN && val > max[pp - res.bytes])	    || (BYTE_ORDER == BIG_ENDIAN && val > max[res.bytes - pp]))	  goto ret_0;	if (addr)		addr->s_addr = res.word | htonl (val);#ifdef _LIBC	__set_errno (saved_errno);#endif	return (1);ret_0:#ifdef _LIBC	__set_errno (saved_errno);#endif	return (0);}