diff options
author | lum <lum@cvs.openbsd.org> | 2012-03-01 13:04:30 +0000 |
---|---|---|
committer | lum <lum@cvs.openbsd.org> | 2012-03-01 13:04:30 +0000 |
commit | 4ee5728df165d58c47c27e37ac423fbb2a01196e (patch) | |
tree | 99bc3401ce037ad72e79d2a8218c201255ead8e5 /usr.bin/pkill | |
parent | cd9b37143a93c5a79af910d3077dab5e64331460 (diff) |
Remove unused variable. Added in 1.20 by me.
Diffstat (limited to 'usr.bin/pkill')
-rw-r--r-- | usr.bin/pkill/pkill.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c index 2a3860fe3d9..531576b9a63 100644 --- a/usr.bin/pkill/pkill.c +++ b/usr.bin/pkill/pkill.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkill.c,v 1.23 2012/02/16 21:25:35 jmc Exp $ */ +/* $OpenBSD: pkill.c,v 1.24 2012/03/01 13:04:29 lum Exp $ */ /* $NetBSD: pkill.c,v 1.5 2002/10/27 11:49:34 kleink Exp $ */ /*- @@ -115,7 +115,6 @@ main(int argc, char **argv) char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q; int i, j, ch, bestidx, rv, criteria; int (*action)(struct kinfo_proc *, int); - int did_action; struct kinfo_proc *kp; struct list *li; u_int32_t bestsec, bestusec; @@ -406,16 +405,13 @@ main(int argc, char **argv) /* * Take the appropriate action for each matched process, if any. */ - did_action = 0; rv = STATUS_NOMATCH; for (i = 0, j = 0, kp = plist; i < nproc; i++, kp++) { if ((kp->p_flag & P_SYSTEM) != 0 || kp->p_pid == mypid) continue; if (selected[i]) { - if (longfmt && !pgrep) { - did_action = 1; + if (longfmt && !pgrep) printf("%d %s\n", (int)kp->p_pid, kp->p_comm); - } if (inverse) continue; } else if (!inverse) |