From: Andi Kleen Date: Thu, 9 Aug 2001 15:52:39 +0000 (+0000) Subject: Increase SIOCGIFCONF buffer size faster for many interfaces. X-Git-Tag: upstream/1.99_20121209git~224 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc474dcd60323a4b3fc3cb84be5a33930f358d86;p=platform%2Fupstream%2Fnet-tools.git Increase SIOCGIFCONF buffer size faster for many interfaces. --- diff --git a/lib/interface.c b/lib/interface.c index 0ab29cd..cf31b27 100644 --- a/lib/interface.c +++ b/lib/interface.c @@ -7,7 +7,7 @@ 8/2000 Andi Kleen make the list operations a bit more efficient. People are crazy enough to use thousands of aliases now. - $Id: interface.c,v 1.16 2001/07/17 07:24:36 pb Exp $ + $Id: interface.c,v 1.17 2001/08/09 15:52:39 ak Exp $ */ #include "config.h" @@ -180,7 +180,7 @@ static int if_readconf(void) } if (ifc.ifc_len == sizeof(struct ifreq) * numreqs) { /* assume it overflowed and try again */ - numreqs += 10; + numreqs *= 2; continue; } break;