提交 60f6fef8 编写于 作者: T Takashi Iwai

ALSA: Optimize module name check

module->name is a fixed array, so we can check the empty contents
straightforwardly in module_slot_match().

Spotted by coverity CID 1056786.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 1f96153b
...@@ -66,7 +66,7 @@ static int module_slot_match(struct module *module, int idx) ...@@ -66,7 +66,7 @@ static int module_slot_match(struct module *module, int idx)
#ifdef MODULE #ifdef MODULE
const char *s1, *s2; const char *s1, *s2;
if (!module || !module->name || !slots[idx]) if (!module || !*module->name || !slots[idx])
return 0; return 0;
s1 = module->name; s1 = module->name;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册