Silence some Valgrind errors

Need to have the allocated memory explicitly cleared for Valgrind
to know it.  We should probably start using calloc or something...
This commit is contained in:
Pasi Kallinen
2016-12-28 22:52:02 +02:00
parent 7cb97cbd14
commit 24f934dfea
3 changed files with 6 additions and 3 deletions

View File

@@ -91,6 +91,7 @@ int nrect;
NhRegion *reg;
reg = (NhRegion *) alloc(sizeof(NhRegion));
(void) memset((genericptr_t)reg, 0, sizeof(NhRegion));
/* Determines bounding box */
if (nrect > 0) {
reg->bounding_box = rects[0];