]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
use static buf for inet_ntoa() output
authorwessels <>
Wed, 21 Aug 1996 11:48:02 +0000 (11:48 +0000)
committerwessels <>
Wed, 21 Aug 1996 11:48:02 +0000 (11:48 +0000)
src/fqdncache.cc

index fb7a16f51c9d19e4d447e25eec23eba378869877..100e095110dd774feb87526af3a4221e6cbaccf2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fqdncache.cc,v 1.8 1996/08/14 21:54:48 wessels Exp $
+ * $Id: fqdncache.cc,v 1.9 1996/08/21 05:48:02 wessels Exp $
  *
  * DEBUG: section 35    FQDN Cache
  * AUTHOR: Harvest Derived
@@ -1029,7 +1029,9 @@ char *fqdnFromAddr(addr)
      struct in_addr addr;
 {
     char *n;
+    static char buf[32];
     if ((n = fqdncache_gethostbyaddr(addr, 0)))
        return n;
-    return inet_ntoa(addr);
+    strcpy(buf, inet_ntoa(addr));
+    return buf;
 }