Fix valgrind complaints of uninitialized memory

This commit is contained in:
Pasi Kallinen
2016-05-23 16:21:36 +03:00
parent bc91a01fdd
commit e37da61b30
6 changed files with 7 additions and 1 deletions

View File

@@ -5496,6 +5496,7 @@ struct fruit *replace_fruit;
return rnd(127);
f = newfruit();
(void) memset((genericptr_t)f, 0, sizeof(struct fruit));
copynchars(f->fname, *altname ? altname : str, PL_FSIZ - 1);
f->fid = ++highest_fruit_id;
/* we used to go out of our way to add it at the end of the list,