From: wessels <> Date: Wed, 21 Aug 1996 11:48:02 +0000 (+0000) Subject: use static buf for inet_ntoa() output X-Git-Tag: SQUID_3_0_PRE1~5947 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39de381a9ab8c0aa055312590f62eb169508958d;p=thirdparty%2Fsquid.git use static buf for inet_ntoa() output --- diff --git a/src/fqdncache.cc b/src/fqdncache.cc index fb7a16f51c..100e095110 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -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; }