aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/pgrep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/procps/pgrep.c b/procps/pgrep.c
index 2ebcca1c0..e4dfacb54 100644
--- a/procps/pgrep.c
+++ b/procps/pgrep.c
@@ -72,8 +72,9 @@ int pgrep_main(int argc, char **argv)
72 first_arg = argv[first_arg_idx]; 72 first_arg = argv[first_arg_idx];
73 if (!first_arg) 73 if (!first_arg)
74 break; 74 break;
75 /* not "-<small_letter>..."? */
75 if (first_arg[0] != '-' || first_arg[1] < 'a' || first_arg[1] > 'z') { 76 if (first_arg[0] != '-' || first_arg[1] < 'a' || first_arg[1] > 'z') {
76 argv[first_arg_idx] = NULL; 77 argv[first_arg_idx] = NULL; /* terminate argv here */
77 break; 78 break;
78 } 79 }
79 first_arg_idx++; 80 first_arg_idx++;