summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2023-03-29 10:28:10 +0000
committerAdrian Johnson <ajohnson@redneon.com>2023-03-29 10:28:10 +0000
commitec14ec47f76b7537260034034bc44454de6e47c1 (patch)
treefd0341f090a935da89ff5c0a4a6111e676742b9b
parentd2b44eccb7d72fd8a2c0c511682ea3cc7f572179 (diff)
parentb1ccd521835abd2af2c9833f2b155e32d3ee282d (diff)
downloadcairo-ec14ec47f76b7537260034034bc44454de6e47c1.tar.gz
Merge branch 'riastradh-20220406-ctype-misuse' into 'master'
Avoid misuse of ctype(3) functions See merge request cairo/cairo!309
-rw-r--r--perf/cairo-analyse-trace.c4
-rw-r--r--perf/cairo-perf-trace.c4
-rw-r--r--test/cairo-test-trace.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/perf/cairo-analyse-trace.c b/perf/cairo-analyse-trace.c
index 6dbe7cf4b..dda33a2e0 100644
--- a/perf/cairo-analyse-trace.c
+++ b/perf/cairo-analyse-trace.c
@@ -290,11 +290,11 @@ read_excludes (cairo_perf_t *perf,
/* whitespace delimits */
s = line;
- while (*s != '\0' && isspace (*s))
+ while (*s != '\0' && isspace ((unsigned char)*s))
s++;
t = s;
- while (*t != '\0' && ! isspace (*t))
+ while (*t != '\0' && ! isspace ((unsigned char)*t))
t++;
if (s != t) {
diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
index cfabcaad0..991a8a5e0 100644
--- a/perf/cairo-perf-trace.c
+++ b/perf/cairo-perf-trace.c
@@ -407,11 +407,11 @@ read_excludes (cairo_perf_t *perf,
/* whitespace delimits */
s = line;
- while (*s != '\0' && isspace (*s))
+ while (*s != '\0' && isspace ((unsigned char)*s))
s++;
t = s;
- while (*t != '\0' && ! isspace (*t))
+ while (*t != '\0' && ! isspace ((unsigned char)*t))
t++;
if (s != t) {
diff --git a/test/cairo-test-trace.c b/test/cairo-test-trace.c
index 3ca82c4b7..78e822cf1 100644
--- a/test/cairo-test-trace.c
+++ b/test/cairo-test-trace.c
@@ -1515,11 +1515,11 @@ read_excludes (test_trace_t *test, const char *filename)
/* whitespace delimits */
s = line;
- while (*s != '\0' && isspace (*s))
+ while (*s != '\0' && isspace ((unsigned char)*s))
s++;
t = s;
- while (*t != '\0' && ! isspace (*t))
+ while (*t != '\0' && ! isspace ((unsigned char)*t))
t++;
if (s != t) {