changeset 6091:64b9f3bed954 1.7

Cast isblank argument to unsigned char.
author Todd C. Miller <Todd.Miller@courtesan.com>
date Thu, 16 Sep 2010 10:40:34 -0400
parents 5065008079df
children 9a328aa25c53
files defaults.c fileops.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/defaults.c	Tue Sep 14 17:12:33 2010 -0400
+++ b/defaults.c	Thu Sep 16 10:40:34 2010 -0400
@@ -684,13 +684,13 @@
 	end = str;
 	do {
 	    /* Remove leading blanks, if nothing but blanks we are done. */
-	    for (start = end; isblank(*start); start++)
+	    for (start = end; isblank((unsigned char)*start); start++)
 		;
 	    if (*start == '\0')
 		break;
 
 	    /* Find end position and perform operation. */
-	    for (end = start; *end && !isblank(*end); end++)
+	    for (end = start; *end && !isblank((unsigned char)*end); end++)
 		;
 	    list_op(start, end - start, def, op == '-' ? delete : add);
 	} while (*end++ != '\0');
--- a/fileops.c	Tue Sep 14 17:12:33 2010 -0400
+++ b/fileops.c	Thu Sep 16 10:40:34 2010 -0400
@@ -170,7 +170,7 @@
 	len = strlen(buf);
 	while (len > 0 && isspace((unsigned char)buf[len - 1]))
 	    buf[--len] = '\0';
-	for (cp = buf; isblank(*cp); cp++)
+	for (cp = buf; isblank((unsigned char)*cp); cp++)
 	    continue;
     }
     return(cp);