summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2018-12-19 18:56:19 +0000
committerJohn Levon <john.levon@joyent.com>2019-02-10 11:07:30 +0000
commit6062513a89a98a278aea621a2e591ba8df1a8b8e (patch)
tree971292146d03359971f8e9ea0311c09e5eaee6ab /usr/src
parenta90997d2f0a442a8aa8a56cbbbbf577716a18742 (diff)
downloadillumos-joyent-6062513a89a98a278aea621a2e591ba8df1a8b8e.tar.gz
10142 smatch fix for who
Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Joshua M. Clulow <josh@sysmgr.org>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/who/who.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/src/cmd/who/who.c b/usr/src/cmd/who/who.c
index f7e4071362..7915138a03 100644
--- a/usr/src/cmd/who/who.c
+++ b/usr/src/cmd/who/who.c
@@ -30,6 +30,10 @@
*/
/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
+/*
* This program analyzes information found in /var/adm/utmpx
*
* Additionally information is gathered from /etc/inittab
@@ -300,7 +304,7 @@ main(int argc, char **argv)
if (sopt == 1) {
terse = 1;
if (Topt == 1 || aopt == 1)
- goerr++;
+ goerr++;
}
#endif /* XPG4 */
@@ -698,7 +702,7 @@ dump()
/*
* 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);