summaryrefslogtreecommitdiff
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 169a920..8cd1a91 100644
--- a/procps/pidof.c
+++ b/procps/pidof.c
@@ -52,11 +52,12 @@ extern int pidof_main(int argc, char **argv)
/* Looks like everything is set to go. */
while(optind < argc) {
- long* pidList;
+ long *pidList;
+ long *pl;
pidList = find_pid_by_name(argv[optind]);
- for(; *pidList > 0; pidList++) {
- printf("%s%ld", (n++ ? " " : ""), (long)*pidList);
+ for(pl = pidList; *pl > 0; pl++) {
+ printf("%s%ld", (n++ ? " " : ""), *pl);
fail = 0;
if (single_flag)
break;