]> granicus.if.org Git - strace/commitdiff
Fixup isdigit calls
authorWichert Akkerman <wichert@deephackmode.org>
Fri, 18 Feb 2000 15:36:12 +0000 (15:36 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Fri, 18 Feb 2000 15:36:12 +0000 (15:36 +0000)
.cvsignore
ChangeLog
strace.c
svr4/.cvsignore [new file with mode: 0644]
syscall.c

index 7b351266066e31b13a9df230f421bb2be8a2f9b8..e6c8e8e2fad6b0368042e49a714ddaf7658a2ab0 100644 (file)
@@ -6,3 +6,4 @@ config.h.in
 config.log
 Makefile
 tags
+strace
index ad05d363bbdedcec6eccecb672a695a9f7ad4e1d..82493773bb6285dc276b8f61d94c9b6f05dc9174 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-12-27  Morten Welinder  <terra@diku.dk>
+
+       * syscall.c (lookup_signal, lookup_desc): isdigit requires an
+       _unsigned_ char parameter.
+
 2000-02-14 Wichert Akkerman <wakkerma@debian.org>
 
   * S390 updates
index ec6bae07df3b83ccf0f9b4c1a2dbabbb3f4e3ea0..223883a20c42b72a8fb864fca072b0fe5df26a6f 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -30,6 +30,7 @@
  *     $Id$
  */
 
+#include <sys/types.h>
 #include "defs.h"
 
 #include <signal.h>
diff --git a/svr4/.cvsignore b/svr4/.cvsignore
new file mode 100644 (file)
index 0000000..f3c7a7c
--- /dev/null
@@ -0,0 +1 @@
+Makefile
index ce0ee30db604bb9fdb627ad62492a9af12108c3d..a52677ca3beaff3680a951c4937ac8a0b2aba8ea 100644 (file)
--- 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;
 }