In both cases we're comparing an array to NULL.
Note that in dev/acpi/dsdt.c I changed the strcmp() condition to == 0;
using ! for string pointer comparison always confuses me. I can drop
that change if people consider it controversial.
ok?
Index: dev/acpi/dsdt.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v
retrieving revision 1.224
diff -u -p -r1.224 dsdt.c
--- dev/acpi/dsdt.c 2 Sep 2016 13:59:51 -0000 1.224
+++ dev/acpi/dsdt.c 24 Sep 2016 17:13:21 -0000
@@ -585,7 +585,7 @@ aml_notify_dev(const char *pnpid, int no
return;
SLIST_FOREACH(pdata, &aml_notify_list, link)
- if (pdata->pnpid && !strcmp(pdata->pnpid, pnpid))
+ if (strcmp(pdata->pnpid, pnpid) == 0)
pdata->cbproc(pdata->node, notify_value, pdata->cbarg);
}
Index: dev/i2c/iatp.c
===================================================================
RCS file: /cvs/src/sys/dev/i2c/iatp.c,v
retrieving revision 1.2
diff -u -p -r1.2 iatp.c
--- dev/i2c/iatp.c 4 Sep 2016 10:45:29 -0000 1.2
+++ dev/i2c/iatp.c 24 Sep 2016 17:13:21 -0000
@@ -548,8 +548,7 @@ iatp_init(struct iatp_softc *sc)
/* find this machine's button config */
sc->t19_button_bit = -1;
- if (hw_vendor == NULL || hw_prod == NULL ||
- sc->sc_hid == NULL)
+ if (hw_vendor == NULL || hw_prod == NULL)
break;
for (m = mxt_t19_button_map_devs; m->vendor != NULL;