Module Name:    src
Committed By:   joerg
Date:           Thu Feb 27 00:49:46 UTC 2014

Modified Files:
        src/usr.bin/w: w.c

Log Message:
struct member can't be null, if the pointer itself is valid.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/usr.bin/w/w.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/w/w.c
diff -u src/usr.bin/w/w.c:1.78 src/usr.bin/w/w.c:1.79
--- src/usr.bin/w/w.c:1.78	Wed Feb 19 20:42:14 2014
+++ src/usr.bin/w/w.c	Thu Feb 27 00:49:46 2014
@@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #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 @@ pr_args(struct kinfo_proc2 *kp)
 	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);

Reply via email to