Author: sayer
Date: 2010-04-16 19:42:25 +0200 (Fri, 16 Apr 2010)
New Revision: 1807

Modified:
   trunk/core/AmStats.h
Log:
initialize buffer on allocation

Modified: trunk/core/AmStats.h
===================================================================
--- trunk/core/AmStats.h        2010-04-16 17:25:38 UTC (rev 1806)
+++ trunk/core/AmStats.h        2010-04-16 17:42:25 UTC (rev 1807)
@@ -30,7 +30,7 @@
 
 #include <sys/types.h>
 #include <math.h>
-
+#include <string.h>
 /** 
  * \brief math mean implementation 
  *
@@ -110,6 +110,7 @@
     MeanValue()
     {
       buffer = new double[size];
+      memset(buffer, 0, sizeof(buffer[0])*size);
     }
 
   ~MeanArray(){

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to