]> granicus.if.org Git - strace/commitdiff
2005-02-01 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Wed, 2 Feb 2005 03:51:18 +0000 (03:51 +0000)
committerRoland McGrath <roland@redhat.com>
Wed, 2 Feb 2005 03:51:18 +0000 (03:51 +0000)
* syscall.c (qual_signal): Fix inverted return value and bogus
argument to qualify_one in the named case.

syscall.c

index c5063340d4ede344dd3119fda2033e9d7ef18a82..524171c5f8551314db6cbae04016eff804a2487f 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -311,7 +311,7 @@ qual_signal(s, opt, not)
 
        if (s && *s && isdigit((unsigned char)*s)) {
                qualify_one(atoi(s), opt, not);
-               return 1;
+               return 0;
        }
        if (strlen(s) >= sizeof buf)
                return 0;
@@ -323,10 +323,10 @@ qual_signal(s, opt, not)
                s += 3;
        for (i = 0; i <= NSIG; i++)
                if (strcmp(s, signame(i) + 3) == 0) {
-                       qualify_one(atoi(s), opt, not);
-                       return 1;
+                       qualify_one(i, opt, not);
+                       return 0;
                }
-       return 0;
+       return -1;
 }
 
 static int