[PATCH 9/9] Add sanity check to Kids::init().

From: Dmitry Kurochkin <dmitry.kurochkin_at_measurement-factory.com>
Date: Thu, 29 Sep 2011 03:06:07 +0400

---
 src/ipc/Kids.cc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git src/ipc/Kids.cc src/ipc/Kids.cc
index 7d36315..2423fca 100644
--- src/ipc/Kids.cc
+++ 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<size_t>(NumberOfKids()));
 }
 
 /// returns kid by pid
-- 
1.7.6.3
Received on Wed Sep 28 2011 - 23:07:42 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 29 2011 - 12:00:03 MDT