summaryrefslogtreecommitdiffstats
path: root/sys/ddb/db_ps.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-09-12 22:32:03 +0000
committerjhb <jhb@FreeBSD.org>2001-09-12 22:32:03 +0000
commitc1c40c6cffa3a5263bd8a06d2e2e39fc0d743545 (patch)
tree1b0c38e8c3c9d7f76c2302ffda091b66f41894b1 /sys/ddb/db_ps.c
parent7029820884c0bb851035031aea81f14a660acbf2 (diff)
downloadFreeBSD-src-c1c40c6cffa3a5263bd8a06d2e2e39fc0d743545.zip
FreeBSD-src-c1c40c6cffa3a5263bd8a06d2e2e39fc0d743545.tar.gz
- Whitespace fixes.
- Fix an old bug: p_comm is an array not a pointer, so it can't be NULL.`
Diffstat (limited to 'sys/ddb/db_ps.c')
-rw-r--r--sys/ddb/db_ps.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c
index 92e0fe6..50f6f19 100644
--- a/sys/ddb/db_ps.c
+++ b/sys/ddb/db_ps.c
@@ -94,37 +94,30 @@ db_ps(dummy1, dummy2, dummy3, dummy4)
pp = p;
db_printf("%5d %8p %8p %4d %5d %5d %06x %d",
- p->p_pid,
- (volatile void *)p,
- (void *)p->p_uarea,
- p->p_ucred ? p->p_ucred->cr_ruid : 0,
- pp->p_pid,
- p->p_pgrp ? p->p_pgrp->pg_id : 0,
- p->p_flag,
- p->p_stat);
+ p->p_pid, (volatile void *)p, (void *)p->p_uarea,
+ p->p_ucred ? p->p_ucred->cr_ruid : 0, pp->p_pid,
+ p->p_pgrp ? p->p_pgrp->pg_id : 0, p->p_flag, p->p_stat);
if (p->p_flag & P_KSES) {
struct thread *td;
- db_printf("(threaded) %s\n",
- p->p_comm ? p->p_comm : "");
+ db_printf("(threaded) %s\n", p->p_comm);
FOREACH_THREAD_IN_PROC(p, td) {
db_printf( ". . . . . . . "
". . . . . . . . ");
if (td->td_wchan) {
- db_printf("%6s %8p",
- td->td_wmesg, (void *)td->td_wchan);
+ db_printf("%6s %8p", td->td_wmesg,
+ (void *)td->td_wchan);
} else {
db_printf("--not blocked--");
}
}
} else {
if (p->p_thread.td_wchan) {
- db_printf(" %6s %8p",
- p->p_thread.td_wmesg,
- (void *)p->p_thread.td_wchan);
+ db_printf(" %6s %8p", p->p_thread.td_wmesg,
+ (void *)p->p_thread.td_wchan);
} else {
db_printf(" ");
}
- db_printf(" %s\n", p->p_comm ? p->p_comm : "");
+ db_printf(" %s\n", p->p_comm);
}
p = LIST_NEXT(p, p_list);
if (p == NULL && np > 0)
OpenPOWER on IntegriCloud