diff options
author | 2004-12-20 15:10:46 +0000 | |
---|---|---|
committer | 2004-12-20 15:10:46 +0000 | |
commit | 60e2ad7d9ffd00c7ee0d2742908daf1d5277e6e5 (patch) | |
tree | 7086cf36e0d6cf8bb475946d31422b42997aead6 | |
parent | some typos in log messages. (diff) | |
download | wireguard-openbsd-60e2ad7d9ffd00c7ee0d2742908daf1d5277e6e5.tar.xz wireguard-openbsd-60e2ad7d9ffd00c7ee0d2742908daf1d5277e6e5.zip |
Don't print an unnecessary trailing space character at the end of command
argument display. This makes it easier to grep ps output for 'foo$', instead
of having to use 'foo *$'. millert@ ok
-rw-r--r-- | bin/ps/print.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 7fc55cc570a..bf80103cabd 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.35 2004/11/24 19:17:10 deraadt Exp $ */ +/* $OpenBSD: print.c,v 1.36 2004/12/20 15:10:46 aaron Exp $ */ /* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -static char rcsid[] = "$OpenBSD: print.c,v 1.35 2004/11/24 19:17:10 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: print.c,v 1.36 2004/12/20 15:10:46 aaron Exp $"; #endif #endif /* not lint */ @@ -120,9 +120,10 @@ command(const struct kinfo_proc2 *kp, VARENT *ve) argv = kvm_getenvv2(kd, kp, termwidth); if ((p = argv) != NULL) { while (*p) { + if (p != argv) + fmt_putc(' ', &left); fmt_puts(*p, &left); p++; - fmt_putc(' ', &left); } } } else @@ -133,9 +134,10 @@ command(const struct kinfo_proc2 *kp, VARENT *ve) argv = kvm_getargv2(kd, kp, termwidth); if ((p = argv) != NULL) { while (*p) { + if (p != argv) + fmt_putc(' ', &left); fmt_puts(*p, &left); p++; - fmt_putc(' ', &left); } } } |