diff options
author | Colin Watson <cjwatson@debian.org> | 2021-01-03 02:06:39 -0800 |
---|---|---|
committer | Vagrant Cascadian <vagrant@debian.org> | 2021-01-03 02:07:31 -0800 |
commit | 701c6f93585ccf81aad8f5cc122e11961d5ab2c7 (patch) | |
tree | 706731064bfb8bcbf3c067f53b395bf42c82cbe4 | |
parent | b9e332faaec10226ce4119c7a47244b5eaeeaa65 (diff) |
Make sure to pass unsigned chars to isspace(), per the C standard; not doing so
can cause problems on powerpc and other architectures.
Gbp-Pq: Name 0002-ctype.patch
-rw-r--r-- | gfxboot-compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gfxboot-compile.c b/gfxboot-compile.c index 835450e..0914d53 100644 --- a/gfxboot-compile.c +++ b/gfxboot-compile.c @@ -658,7 +658,7 @@ char *next_word(char **ptr) *word = 0; - while(isspace(*s)) if(*s++ == '\n') line++; + while(isspace((unsigned char) *s)) if(*s++ == '\n') line++; if(!*s) { *ptr = s; @@ -757,7 +757,7 @@ char *next_word(char **ptr) word[n] = 0; } else { - while(!isspace(*s)) s++; + while(!isspace((unsigned char) *s)) s++; } if(!is_str) { |