]> granicus.if.org Git - strace/commitdiff
2006-04-25 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 25 Apr 2006 07:39:40 +0000 (07:39 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 25 Apr 2006 07:39:40 +0000 (07:39 +0000)
* strace.c (main): Fail when nonoption args follow -p switches.
Fixes Debian#361302.

strace.c

index 75574d5f7b4b476eab50aa5dc764166b2b0129da..95ab48dec777dfbb8ebcc2325ec9c41d526b181f 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -311,7 +311,7 @@ char *argv[];
                }
        }
 
-       if (optind == argc && !pflag_seen)
+       if ((optind == argc) == !pflag_seen)
                usage(stderr, 1);
 
        /* See if they want to run as another user. */