]> git.baikalelectronics.ru Git - kernel.git/commit
kernel/auditfilter: kill bogus uninit'd-var compiler warning
authorJeff Garzik <jeff@garzik.org>
Tue, 17 Jul 2007 01:25:01 +0000 (21:25 -0400)
committerJeff Garzik <jeff@garzik.org>
Tue, 17 Jul 2007 20:17:59 +0000 (16:17 -0400)
commit84d8fbf7dd93e07d9b3248eca8662fda110b39a7
tree6addd4e43f433543b33ef0c5e8fdb9f0855f5dce
parent5f48bdd1e9883fb580ff825abb9fe5eed848f03d
kernel/auditfilter: kill bogus uninit'd-var compiler warning

Kill this warning...

kernel/auditfilter.c: In function ‘audit_receive_filter’:
kernel/auditfilter.c:1213: warning: ‘ndw’ may be used uninitialized in this function
kernel/auditfilter.c:1213: warning: ‘ndp’ may be used uninitialized in this function

...with a simplification of the code.  audit_put_nd() can accept NULL
arguments, just like kfree().  It is cleaner to init two existing vars
to NULL, remove the redundant test variable 'putnd_needed' branches, and call
audit_put_nd() directly.

As a desired side effect, the warning goes away.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
kernel/auditfilter.c