]> git.baikalelectronics.ru Git - kernel.git/commit
KEYS: Fix variable uninitialisation warnings
authorDavid Howells <dhowells@redhat.com>
Mon, 29 Dec 2008 00:41:51 +0000 (00:41 +0000)
committerJames Morris <jmorris@namei.org>
Mon, 29 Dec 2008 03:24:43 +0000 (14:24 +1100)
commitd3505439f9091c0cb6e977a55b9c606079bc20b1
tree58ce85049625d01d52f3b32a6035bce9dbbc4ebf
parent183459115faa2a47f05e4aabb20d0c9694771c51
KEYS: Fix variable uninitialisation warnings

Fix variable uninitialisation warnings introduced in:

commit 941a0247ba3edd21694b23740b777f902cf12f37
Author: David Howells <dhowells@redhat.com>
Date:   Fri Nov 14 10:39:14 2008 +1100

KEYS: Alter use of key instantiation link-to-keyring argument

As:

  security/keys/keyctl.c: In function 'keyctl_negate_key':
  security/keys/keyctl.c:976: warning: 'dest_keyring' may be used uninitialized in this function
  security/keys/keyctl.c: In function 'keyctl_instantiate_key':
  security/keys/keyctl.c:898: warning: 'dest_keyring' may be used uninitialized in this function

Some versions of gcc notice that get_instantiation_key() doesn't always set
*_dest_keyring, but fail to observe that if this happens then *_dest_keyring
will not be read by the caller.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
security/keys/keyctl.c