瀏覽代碼

KEYS: Permit key_serial() to be called with a const key pointer

Permit key_serial() to be called with a const key pointer.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
David Howells 13 年之前
父節點
當前提交
456a8167e9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/linux/key.h

+ 1 - 1
include/linux/key.h

@@ -271,7 +271,7 @@ extern int keyring_add_key(struct key *keyring,
 
 
 extern struct key *key_lookup(key_serial_t id);
 extern struct key *key_lookup(key_serial_t id);
 
 
-static inline key_serial_t key_serial(struct key *key)
+static inline key_serial_t key_serial(const struct key *key)
 {
 {
 	return key ? key->serial : 0;
 	return key ? key->serial : 0;
 }
 }