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

@@ -3307,6 +3307,7 @@ long cost;
return;
}
tmp_dam = (struct damage *) alloc((unsigned) sizeof(struct damage));
(void) memset((genericptr_t)tmp_dam, 0, sizeof(struct damage));
tmp_dam->when = monstermoves;
tmp_dam->place.x = x;
tmp_dam->place.y = y;