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: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2013-10-28 12:54:52 +01:00
parent 1f96153bc6
commit 60f6fef877
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ static int module_slot_match(struct module *module, int idx)
#ifdef MODULE
const char *s1, *s2;
if (!module || !module->name || !slots[idx])
if (!module || !*module->name || !slots[idx])
return 0;
s1 = module->name;