From 2c1d33f813fdcc02452a51bfb21f123c4896bdea Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 22 Sep 2022 02:54:27 +0200 Subject: pfinet: Fix warning --- pfinet/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pfinet/main.c b/pfinet/main.c index 1df987f0..e3e027c7 100644 --- a/pfinet/main.c +++ b/pfinet/main.c @@ -346,8 +346,7 @@ main (int argc, if (bootstrap != MACH_PORT_NULL) { /* Create portclass to install on the bootstrap port. */ - if(pfinet_protid_portclasses[pfinet_bootstrap_portclass] - != MACH_PORT_NULL) + if(pfinet_protid_portclasses[pfinet_bootstrap_portclass] != NULL) error(1, 0, "No portclass left to assign to bootstrap port"); #ifdef CONFIG_IPV6 @@ -389,7 +388,7 @@ main (int argc, /* Check that at least one portclass has been bound, error out otherwise. */ for (i = 0; i < ARRAY_SIZE (pfinet_protid_portclasses); i++) - if (pfinet_protid_portclasses[i] != MACH_PORT_NULL) + if (pfinet_protid_portclasses[i] != NULL) break; if (i == ARRAY_SIZE (pfinet_protid_portclasses)) @@ -442,7 +441,7 @@ pfinet_bind (int portclass, const char *name) err = errno; if (! err) { - if (pfinet_protid_portclasses[portclass] != MACH_PORT_NULL) + if (pfinet_protid_portclasses[portclass] != NULL) error (1, 0, "Cannot bind one protocol to multiple nodes.\n"); #ifdef CONFIG_IPV6 -- cgit v1.2.3