Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/w struct member can't be null, if the pointer itself...
details: https://anonhg.NetBSD.org/src/rev/523e49e370fe
branches: trunk
changeset: 327082:523e49e370fe
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Feb 27 00:49:46 2014 +0000
description:
struct member can't be null, if the pointer itself is valid.
diffstat:
usr.bin/w/w.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diffs (37 lines):
diff -r 2fb4714615ce -r 523e49e370fe usr.bin/w/w.c
--- a/usr.bin/w/w.c Wed Feb 26 22:40:07 2014 +0000
+++ b/usr.bin/w/w.c Thu Feb 27 00:49:46 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: w.c,v 1.78 2014/02/19 20:42:14 dsl Exp $ */
+/* $NetBSD: w.c,v 1.79 2014/02/27 00:49:46 joerg Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)w.c 8.6 (Berkeley) 6/30/94";
#else
-__RCSID("$NetBSD: w.c,v 1.78 2014/02/19 20:42:14 dsl Exp $");
+__RCSID("$NetBSD: w.c,v 1.79 2014/02/27 00:49:46 joerg Exp $");
#endif
#endif /* not lint */
@@ -426,14 +426,10 @@
left = argwidth;
argv = kvm_getargv2(kd, kp, (argwidth < 0) ? 0 : argwidth);
if (argv == 0) {
- if (kp->p_comm == 0) {
- goto nothing;
- } else {
- fmt_putc('(', &left);
- fmt_puts((char *)kp->p_comm, &left);
- fmt_putc(')', &left);
- return;
- }
+ fmt_putc('(', &left);
+ fmt_puts((char *)kp->p_comm, &left);
+ fmt_putc(')', &left);
+ return;
}
while (*argv) {
fmt_puts(*argv, &left);
Home |
Main Index |
Thread Index |
Old Index