Module Name:    src
Committed By:   joerg
Date:           Sat Nov 15 01:58:34 UTC 2014

Modified Files:
        src/bin/ps: print.c

Log Message:
Use l_wmesg if the string is not empty. Don't bother checking l_name for
nullness.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/bin/ps/print.c

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

Modified files:

Index: src/bin/ps/print.c
diff -u src/bin/ps/print.c:1.122 src/bin/ps/print.c:1.123
--- src/bin/ps/print.c:1.122	Sun Apr 20 22:48:59 2014
+++ src/bin/ps/print.c	Sat Nov 15 01:58:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: print.c,v 1.122 2014/04/20 22:48:59 dholland Exp $	*/
+/*	$NetBSD: print.c,v 1.123 2014/11/15 01:58:34 joerg Exp $	*/
 
 /*
  * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = "@(#)print.c	8.6 (Berkeley) 4/16/94";
 #else
-__RCSID("$NetBSD: print.c,v 1.122 2014/04/20 22:48:59 dholland Exp $");
+__RCSID("$NetBSD: print.c,v 1.123 2014/11/15 01:58:34 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -947,7 +947,7 @@ wchan(void *arg, VARENT *ve, enum mode m
 	l = arg;
 	v = ve->var;
 	if (l->l_wchan) {
-		if (l->l_wmesg) {
+		if (l->l_wmesg[0]) {
 			strprintorsetwidth(v, l->l_wmesg, mode);
 			v->width = min(v->width, KI_WMESGLEN);
 		} else {
@@ -1464,7 +1464,7 @@ lname(void *arg, VARENT *ve, enum mode m
 
 	l = arg;
 	v = ve->var;
-	if (l->l_name && l->l_name[0] != '\0') {
+	if (l->l_name[0] != '\0') {
 		strprintorsetwidth(v, l->l_name, mode);
 		v->width = min(v->width, KI_LNAMELEN);
 	} else {

Reply via email to