diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2002-11-26 01:12:28 +0300 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2002-11-26 01:12:28 +0300 |
commit | bb2e9d47f3c7c8172836b589292612e5f155f054 (patch) | |
tree | 551b8f0c0328b4458a1ab9e9dad19adb0ab4ab4f /procps/pidof.c | |
parent | 5b110874dfa16dc41f31d8b34eef3d721573ca40 (diff) |
last_patch_67 from Vladimir N. Oleynik
Diffstat (limited to 'procps/pidof.c')
-rw-r--r-- | procps/pidof.c | 7 |
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) /* 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; |