From: Dmitry Kurochkin Date: Tue, 4 Oct 2011 17:28:17 +0000 (+0400) Subject: Add sanity check to Kids::init(). X-Git-Tag: BumpSslServerFirst.take01~122^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96a20046674244b84cfc3c8439de6a5ff0057123;p=thirdparty%2Fsquid.git Add sanity check to Kids::init(). --- diff --git a/src/ipc/Kids.cc b/src/ipc/Kids.cc index 7d363151aa..2423fca3c9 100644 --- a/src/ipc/Kids.cc +++ b/src/ipc/Kids.cc @@ -6,6 +6,7 @@ */ #include "config.h" +#include "base/TextException.h" #include "ipc/Kids.h" #include "protos.h" @@ -43,6 +44,8 @@ void Kids::init() snprintf(kid_name, sizeof(kid_name), "(squid-coord-%d)", (int)(storage.size()+1)); storage.push_back(Kid(kid_name)); } + + Must(storage.size() == static_cast(NumberOfKids())); } /// returns kid by pid