summaryrefslogtreecommitdiff
path: root/procps/pidof.c
diff options
context:
space:
mode:
authorGlenn L McGrath2002-11-25 22:12:28 +0000
committerGlenn L McGrath2002-11-25 22:12:28 +0000
commitbb2e9d47f3c7c8172836b589292612e5f155f054 (patch)
tree551b8f0c0328b4458a1ab9e9dad19adb0ab4ab4f /procps/pidof.c
parent5b110874dfa16dc41f31d8b34eef3d721573ca40 (diff)
downloadbusybox-bb2e9d47f3c7c8172836b589292612e5f155f054.zip
busybox-bb2e9d47f3c7c8172836b589292612e5f155f054.tar.gz
last_patch_67 from Vladimir N. Oleynik
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;