Module Name: src Committed By: mrg Date: Thu Aug 3 08:35:14 UTC 2023
Modified Files: src/sys/dev/podulebus: if_ea.c Log Message: check if string is nul char, not if array is NULL. avoids always-true condition. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/podulebus/if_ea.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/podulebus/if_ea.c diff -u src/sys/dev/podulebus/if_ea.c:1.17 src/sys/dev/podulebus/if_ea.c:1.18 --- src/sys/dev/podulebus/if_ea.c:1.17 Wed Oct 10 22:17:44 2012 +++ src/sys/dev/podulebus/if_ea.c Thu Aug 3 08:35:14 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ea.c,v 1.17 2012/10/10 22:17:44 skrll Exp $ */ +/* $NetBSD: if_ea.c,v 1.18 2023/08/03 08:35:14 mrg Exp $ */ /* * Copyright (c) 2000, 2001 Ben Harris @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ea.c,v 1.17 2012/10/10 22:17:44 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ea.c,v 1.18 2023/08/03 08:35:14 mrg Exp $"); #include <sys/param.h> @@ -119,7 +119,7 @@ eaattach(device_t parent, device_t self, &sc->sc_8005.sc_ioh); /* Get the Ethernet address from the device description string. */ - if (pa->pa_descr == NULL) { + if (pa->pa_descr[0] == '\0') { printf(": No description for Ethernet address\n"); return; }