diff --git a/usr.sbin/flashctl/Makefile b/usr.sbin/flashctl/Makefile index cbc4047e8929..c4a4f54a1614 100644 --- a/usr.sbin/flashctl/Makefile +++ b/usr.sbin/flashctl/Makefile @@ -1,11 +1,12 @@ -# $NetBSD: Makefile,v 1.3 2023/01/08 15:49:51 rillig Exp $ +# $NetBSD: Makefile,v 1.4 2024/05/13 20:38:05 rillig Exp $ SRCS= flashctl.c PROG= flashctl MAN= flashctl.8 -LINTFLAGS+= -T # strict bool mode +LINTFLAGS+= ${MKLLVM:U-T:D} # strict bool mode WARNS= 4 .include + diff --git a/usr.sbin/flashctl/flashctl.c b/usr.sbin/flashctl/flashctl.c index 7b63c2f7164c..781ab80acb7b 100644 --- a/usr.sbin/flashctl/flashctl.c +++ b/usr.sbin/flashctl/flashctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: flashctl.c,v 1.10 2024/05/12 19:03:55 rillig Exp $ */ +/* $NetBSD: flashctl.c,v 1.11 2024/05/13 20:38:05 rillig Exp $ */ /*- * Copyright (c) 2010 Department of Software Engineering, @@ -32,7 +32,7 @@ */ #include -__RCSID("$NetBSD: flashctl.c,v 1.10 2024/05/12 19:03:55 rillig Exp $"); +__RCSID("$NetBSD: flashctl.c,v 1.11 2024/05/13 20:38:05 rillig Exp $"); #include #include @@ -233,11 +233,11 @@ to_intmax(intmax_t *num, const char *str) errno = 0; if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) { - if (isxdigit((unsigned char)str[2]) == 0) + if (!isxdigit((unsigned char)str[2])) return EINVAL; *num = strtoimax(str, &endptr, 16); } else { - if (isdigit((unsigned char)str[0]) == 0) + if (!isdigit((unsigned char)str[0])) return EINVAL; *num = strtoimax(str, &endptr, 10); }