提交 27720e75 编写于 作者: I Insu Yun 提交者: David Howells

keys: Be more consistent in selection of union members used

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.
Signed-off-by: NInsu Yun <wuninsu@gmail.com>
Signed-off-by: NDavid Howells <dhowells@redhat.com>
上级 48dbc164
...@@ -278,7 +278,7 @@ struct key *key_alloc(struct key_type *type, const char *desc, ...@@ -278,7 +278,7 @@ struct key *key_alloc(struct key_type *type, const char *desc,
key->index_key.desc_len = desclen; key->index_key.desc_len = desclen;
key->index_key.description = kmemdup(desc, desclen + 1, GFP_KERNEL); key->index_key.description = kmemdup(desc, desclen + 1, GFP_KERNEL);
if (!key->description) if (!key->index_key.description)
goto no_memory_3; goto no_memory_3;
atomic_set(&key->usage, 1); atomic_set(&key->usage, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册