]> granicus.if.org Git - nethack/commit
valgrind trap complaint
authorPatR <rankin@nethack.org>
Sat, 21 Nov 2015 02:31:17 +0000 (18:31 -0800)
committerPatR <rankin@nethack.org>
Sat, 21 Nov 2015 02:31:17 +0000 (18:31 -0800)
commitd3d332e6067b2a3207087af288d8fbabecaaf813
tree6e96fcc58a970b6e91775168aa750c0ac48182c4
parent9518e74c93e08f9c7dcc4512ddeb3f3329bb01c0
valgrind trap complaint

I think this should fix one of the valgrind complaints.  Traps which
didn't use the trap->vl union field never initialized it, leaving a
bit of random garbage in the malloc'd trap structure.  (And traps
which overwrote existing ones that did use it didn't reinitialize it
so kept stale data around.)  Since those fields weren't in use by
the traps that don't care about them, this didn't provoke any actual
trouble.

Also reformatting....
src/trap.c