--------------------- PatchSet 11448 Date: 2007/05/21 05:53:43 Author: adrian Branch: HEAD Tag: (none) Log: use inet_ntoa() for now; my optimised code was getting the octets backward on my PPC; even when I tried using ntohl(). I'll fix this one day.. Members: src/tools.c:1.252->1.253 Index: squid/src/tools.c =================================================================== RCS file: /cvsroot/squid/squid/src/tools.c,v retrieving revision 1.252 retrieving revision 1.253 diff -u -r1.252 -r1.253 --- squid/src/tools.c 1 Apr 2007 14:17:50 -0000 1.252 +++ squid/src/tools.c 21 May 2007 05:53:43 -0000 1.253 @@ -1,6 +1,6 @@ /* - * $Id: tools.c,v 1.252 2007/04/01 14:17:50 serassio Exp $ + * $Id: tools.c,v 1.253 2007/05/21 05:53:43 adrian Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -1351,38 +1351,5 @@ const char * xinet_ntoa(const struct in_addr addr) { - static char buf[32]; - char *s = buf + 30; - unsigned char a; - - s[31] = '\0'; - - a = (addr.s_addr >> 24) & 0xff; - do { - *(s--) = (a % 10) + '0'; - a /= 10; - } while (a > 0); - *(s--) = '.'; - - a = (addr.s_addr >> 16) & 0xff; - do { - *(s--) = (a % 10) + '0'; - a /= 10; - } while (a > 0); - *(s--) = '.'; - - a = (addr.s_addr >> 8) & 0xff; - do { - *(s--) = (a % 10) + '0'; - a /= 10; - } while (a > 0); - *(s--) = '.'; - - a = (addr.s_addr) & 0xff; - do { - *(s--) = (a % 10) + '0'; - a /= 10; - } while (a > 0); - - return s + 1; + return inet_ntoa(addr); }