Commit 76b54cf0 authored by Masahiro Yamada's avatar Masahiro Yamada

modpost: remove unneeded local variable in contains_namespace()

The local variable, ns_entry, is unneeded.

While I was here, I also cleaned up the comparison with NULL or 0.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: default avatarMatthias Maennich <maennich@google.com>
parent bc35d4bd
......@@ -239,10 +239,8 @@ static struct symbol *find_symbol(const char *name)
static bool contains_namespace(struct namespace_list *list,
const char *namespace)
{
struct namespace_list *ns_entry;
for (ns_entry = list; ns_entry != NULL; ns_entry = ns_entry->next)
if (strcmp(ns_entry->namespace, namespace) == 0)
for (; list; list = list->next)
if (!strcmp(list->namespace, namespace))
return true;
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment