[or-cvs] r13621: One last tweak on debugging code. (tor/trunk/src/common)

nickm at seul.org nickm at seul.org
Wed Feb 20 17:30:01 UTC 2008


Author: nickm
Date: 2008-02-20 12:30:00 -0500 (Wed, 20 Feb 2008)
New Revision: 13621

Modified:
   tor/trunk/src/common/container.h
Log:
One last tweak on debugging code.

Modified: tor/trunk/src/common/container.h
===================================================================
--- tor/trunk/src/common/container.h	2008-02-20 17:03:16 UTC (rev 13620)
+++ tor/trunk/src/common/container.h	2008-02-20 17:30:00 UTC (rev 13621)
@@ -348,7 +348,8 @@
   ptr = tor_realloc(ba, sz_new*sizeof(unsigned int));
   /* This memset does nothing to the older excess bytes.  But they were
    * already set to 0 by bitarry_init_zero. */
-  memset(ptr+sz_old, 0, (sz_new-sz_old)*sizeof(unsigned int));
+  memset(ptr+sz_old*sizeof(unsigned int), 0,
+         (sz_new-sz_old)*sizeof(unsigned int));
   return (bitarray_t*) ptr;
 }
 /** Free the bit array <b>ba</b>. */



More information about the tor-commits mailing list