]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Zero out a local variable also when PURIFY is not defined.
authorMichael Tuexen <tuexen@FreeBSD.org>
Thu, 10 Sep 2015 10:23:23 +0000 (10:23 +0000)
committerMichael Tuexen <tuexen@FreeBSD.org>
Thu, 10 Sep 2015 10:23:23 +0000 (10:23 +0000)
commit14914827f0f5d112d73166599a6e0e71c2640361
treed620b559988744e855e972739a10e27e91e719af
parent3f326305fc537855e84e9672ee71f7505405b790
Zero out a local variable also when PURIFY is not defined.
This silence a warning brought up by valgrind whenever if_nametoindex
is used. This was already discussed in PR 166483, but the code
committed in r234329 guards the initilization with #ifdef PURIFY.
Therefore, valgrind still complains. Since this code is not performance
critical, always zero out the local variable to silence valgrind.

PR: 166483
Discussed with: eadler@
MFC after: 4 weeks
lib/libc/net/if_nametoindex.c