Module Name:    src
Committed By:   uwe
Date:           Tue Aug 13 10:14:04 UTC 2024

Modified Files:
        src/usr.bin/config: scan.l

Log Message:
config: fix ctype(3) argument casts

See CAVEATS.  Doesn't matter here in practice, but that's not an
excuse to set a bad example.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/config/scan.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/config/scan.l
diff -u src/usr.bin/config/scan.l:1.35 src/usr.bin/config/scan.l:1.36
--- src/usr.bin/config/scan.l:1.35	Thu Jan 18 04:41:37 2024
+++ src/usr.bin/config/scan.l	Tue Aug 13 10:14:04 2024
@@ -1,5 +1,5 @@
 %{
-/*	$NetBSD: scan.l,v 1.35 2024/01/18 04:41:37 thorpej Exp $	*/
+/*	$NetBSD: scan.l,v 1.36 2024/08/13 10:14:04 uwe Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: scan.l,v 1.35 2024/01/18 04:41:37 thorpej Exp $");
+__RCSID("$NetBSD: scan.l,v 1.36 2024/08/13 10:14:04 uwe Exp $");
 
 #include <sys/param.h>
 #include <errno.h>
@@ -575,9 +575,9 @@ getincludepath(void)
 	ptrdiff_t len;
 	const char *e;
 
-	while (*p && isascii((unsigned int)*p) && !isspace((unsigned int)*p))
+	while (*p && isascii((unsigned char)*p) && !isspace((unsigned char)*p))
 		p++;
-	while (*p && isascii((unsigned int)*p) && isspace((unsigned int)*p))
+	while (*p && isascii((unsigned char)*p) && isspace((unsigned char)*p))
 		p++;
 	if (!*p)
 		return 0;
@@ -587,8 +587,8 @@ getincludepath(void)
 		if (!e) return 0;
 	} else {
 		e = p;
-		while (*e && isascii((unsigned int)*e)
-		    && !isspace((unsigned int)*e))
+		while (*e && isascii((unsigned char)*e)
+		    && !isspace((unsigned char)*e))
 			e++;
 	}
 
@@ -649,12 +649,12 @@ getcurifdef(void)
 {
 	char *p = yytext, *q;
 
-	while (*p && isascii((unsigned int)*p) && !isspace((unsigned int)*p))
+	while (*p && isascii((unsigned char)*p) && !isspace((unsigned char)*p))
 		p++;
-	while (*p && isascii((unsigned int)*p) && isspace((unsigned int)*p))
+	while (*p && isascii((unsigned char)*p) && isspace((unsigned char)*p))
 		p++;
 	q = p;
-	while (*q && isascii((unsigned int)*q) && !isspace((unsigned int)*q))
+	while (*q && isascii((unsigned char)*q) && !isspace((unsigned char)*q))
 		q++;
 	*q = '\0';
 

Reply via email to