From: Wichert Akkerman Date: Fri, 18 Feb 2000 15:36:12 +0000 (+0000) Subject: Fixup isdigit calls X-Git-Tag: v4.5.18~1129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ee6e45f36566e8735b35ffad40bfcc626a25a98;p=strace Fixup isdigit calls --- diff --git a/.cvsignore b/.cvsignore index 7b351266..e6c8e8e2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -6,3 +6,4 @@ config.h.in config.log Makefile tags +strace diff --git a/ChangeLog b/ChangeLog index ad05d363..82493773 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-12-27 Morten Welinder + + * syscall.c (lookup_signal, lookup_desc): isdigit requires an + _unsigned_ char parameter. + 2000-02-14 Wichert Akkerman * S390 updates diff --git a/strace.c b/strace.c index ec6bae07..223883a2 100644 --- a/strace.c +++ b/strace.c @@ -30,6 +30,7 @@ * $Id$ */ +#include #include "defs.h" #include diff --git a/svr4/.cvsignore b/svr4/.cvsignore new file mode 100644 index 00000000..f3c7a7c5 --- /dev/null +++ b/svr4/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/syscall.c b/syscall.c index ce0ee30d..a52677ca 100644 --- a/syscall.c +++ b/syscall.c @@ -265,12 +265,12 @@ char *s; int i; char buf[32]; - if (s && *s && isdigit(*s)) + if (s && *s && isdigit((unsigned char)*s)) return atoi(s); strcpy(buf, s); s = buf; for (i = 0; s[i]; i++) - s[i] = toupper(s[i]); + s[i] = toupper((unsigned char)(s[i])); if (strncmp(s, "SIG", 3) == 0) s += 3; for (i = 0; i <= NSIG; i++) { @@ -291,7 +291,7 @@ static int lookup_desc(s) char *s; { - if (s && *s && isdigit(*s)) + if (s && *s && isdigit((unsigned char)*s)) return atoi(s); return -1; }