]> granicus.if.org Git - procps-ng/commitdiff
minor fix for -u fix
authorCraig Small <csmall@enc.com.au>
Sun, 17 Jun 2012 08:19:48 +0000 (18:19 +1000)
committerCraig Small <csmall@enc.com.au>
Sun, 17 Jun 2012 08:19:48 +0000 (18:19 +1000)
Commit a5d9c40262c2f5f917d5f27c5f052bdbe7066ac1 had one small problem.
In that function its *argc not argc. This stops pgrep with no commands
from segfaulting, thankyou dejagnu!!

Signed-Off-By: Craig Small <csmall@enc.com.au>
pgrep.c

diff --git a/pgrep.c b/pgrep.c
index 5b39c0c826b752efbfd13849284cb589808cdb39..3377175f27a586a76080da9df4668d20b8e96adf 100644 (file)
--- a/pgrep.c
+++ b/pgrep.c
@@ -564,7 +564,7 @@ int signal_option(int *argc, char **argv)
 {
        int sig;
        int i = 1;
-       if (argc > 2 && argv[1][0] == '-') {
+       if (*argc > 2 && argv[1][0] == '-') {
                sig = signal_name_to_number(argv[i] + 1);
                if (sig == -1 && isdigit(argv[1][1]))
                        sig = atoi(argv[1] + 1);