Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/ps Use l_wmesg if the string is not empty. Don't bother ...



details:   https://anonhg.NetBSD.org/src/rev/f17e5e74b404
branches:  trunk
changeset: 333716:f17e5e74b404
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Nov 15 01:58:34 2014 +0000

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

diffstat:

 bin/ps/print.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r d2092ef7516b -r f17e5e74b404 bin/ps/print.c
--- a/bin/ps/print.c    Sat Nov 15 01:52:01 2014 +0000
+++ b/bin/ps/print.c    Sat Nov 15 01:58:34 2014 +0000
@@ -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 @@
        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 @@
 
        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 {



Home | Main Index | Thread Index | Old Index