Skip to content

Commit e7d832b

Browse files
committed
Fix tautological comparison in dsdt code.
The pnpid member is a char[20] array in a struct. It's the second member of that struct. Comparing the pointer of pnpid is always not NULL.
1 parent 11aaf6b commit e7d832b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sys/dev/acpi/dsdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ aml_notify_dev(const char *pnpid, int notify_value)
581581
return;
582582

583583
SLIST_FOREACH(pdata, &aml_notify_list, link)
584-
if (pdata->pnpid && !strcmp(pdata->pnpid, pnpid))
584+
if (!strcmp(pdata->pnpid, pnpid))
585585
pdata->cbproc(pdata->node, notify_value, pdata->cbarg);
586586
}
587587

0 commit comments

Comments
 (0)