From f493b636b25545ebda0efbc80308634b069fc9da Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 11 Feb 2023 10:59:53 +0100 Subject: [PATCH] interfaces: fix use of isdigit() It is expecting an unsigned char. Make a cast. --- src/daemon/interfaces-bsd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/daemon/interfaces-bsd.c b/src/daemon/interfaces-bsd.c index 35e6f404..a8248fe9 100644 --- a/src/daemon/interfaces-bsd.c +++ b/src/daemon/interfaces-bsd.c @@ -310,7 +310,9 @@ ifbsd_denylist(struct lldpd *cfg, struct interfaces_device_list *interfaces) int i; if (strncmp(iface->name, "p2p", 3)) continue; if (strlen(iface->name) < 4) continue; - for (i = 3; iface->name[i] != '\0' && isdigit(iface->name[i]); i++) + for (i = 3; + iface->name[i] != '\0' && isdigit((unsigned char)(iface->name[i])); + i++) ; if (iface->name[i] == '\0') { log_debug("interfaces", "skip %s: AirDrop interface", -- 2.39.5