aboutsummaryrefslogtreecommitdiff
path: root/procps/pidof.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/pidof.c')
-rw-r--r--procps/pidof.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/procps/pidof.c b/procps/pidof.c
index 169a92007..8cd1a91c8 100644
--- a/procps/pidof.c
+++ b/procps/pidof.c
@@ -52,11 +52,12 @@ extern int pidof_main(int argc, char **argv)
52 52
53 /* Looks like everything is set to go. */ 53 /* Looks like everything is set to go. */
54 while(optind < argc) { 54 while(optind < argc) {
55 long* pidList; 55 long *pidList;
56 long *pl;
56 57
57 pidList = find_pid_by_name(argv[optind]); 58 pidList = find_pid_by_name(argv[optind]);
58 for(; *pidList > 0; pidList++) { 59 for(pl = pidList; *pl > 0; pl++) {
59 printf("%s%ld", (n++ ? " " : ""), (long)*pidList); 60 printf("%s%ld", (n++ ? " " : ""), *pl);
60 fail = 0; 61 fail = 0;
61 if (single_flag) 62 if (single_flag)
62 break; 63 break;