diff options
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/fmt.c | 2 | ||||
-rw-r--r-- | bin/ps/ps.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/bin/ps/fmt.c b/bin/ps/fmt.c index 4d7b120..4db6b8d 100644 --- a/bin/ps/fmt.c +++ b/bin/ps/fmt.c @@ -123,7 +123,7 @@ fmt_argv(char **argv, char *cmd, char *thread, size_t maxlen) if (cp == NULL) errx(1, "malloc failed"); if (ap == NULL) { - if (showthreads && thread != NULL) { + if (thread != NULL) { asprintf(&ap, "%s/%s", cmd, thread); sprintf(cp, "[%.*s]", (int)maxlen, ap); free(ap); diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 8a05ebc..7099cc0 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -1168,7 +1168,7 @@ fmt(char **(*fn)(kvm_t *, const struct kinfo_proc *, int), KINFO *ki, const char *s; s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm, - ki->ki_p->ki_numthreads > 1 ? thread : NULL, maxlen); + showthreads && ki->ki_p->ki_numthreads > 1 ? thread : NULL, maxlen); return (s); } |