Skip to contentSkip to conversation

keys: change member variable name

PATCH In review Insu Yun 2 participants 2 messages Oct 15, 2015

Subsystems (2)
lore
Share & tools
lore

Insu Yun

author
#0 lore raw

PATCH 1/1 keys: change member variable name

key->description and key->index_key.description are same because they are unioned. But, for readability, using same name for duplication and validation seems better.

---
 security/keys/key.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/keys/key.c +1 -1
index aee2ec5..c047846 100644
@@ -278,7 +278,7 @@ struct key *key_alloc(struct key_type *type, const char *desc,
 
 	key->index_key.desc_len = desclen;
 	key->index_key.description = kmemdup(desc, desclen + 1, GFP_KERNEL);
-	if (!key->description)
+	if (!key->index_key.description)
 		goto no_memory_3;
 
 	atomic_set(&key->usage, 1);
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 5 lines · Insu Yun

key->description and key->index_key.description are same because they are unioned. But, for readability, using same name for duplication and validation seems better.

I've applied this, but I've changed the subject line to:

keys: Be more consistent in selection of union members used

if you're okay with that.

David