Print this page
10142 smatch fix for who

@@ -28,10 +28,14 @@
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
+/*
  *      This program analyzes information found in /var/adm/utmpx
  *
  *      Additionally information is gathered from /etc/inittab
  *      if requested.
  *

@@ -696,11 +700,11 @@
         }
 
         /*
          *      Get remote host from utmpx structure
          */
-        if (utmpp && utmpp->ut_host[0])
+        if (utmpp->ut_host[0])
                 (void) printf("\t(%.*s)", sizeof (utmpp->ut_host),
                     utmpp->ut_host);
 
         /*
          *      Now, put on the trailing EOL