summaryrefslogtreecommitdiff
path: root/usr/src/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd')
-rw-r--r--usr/src/cmd/checknr/checknr.c6
-rw-r--r--usr/src/cmd/flowstat/flowstat.c8
-rw-r--r--usr/src/cmd/fmtmsg/main.c7
-rw-r--r--usr/src/cmd/sgs/librtld_db/common/rtld_db.c7
-rw-r--r--usr/src/cmd/who/who.c8
5 files changed, 24 insertions, 12 deletions
diff --git a/usr/src/cmd/checknr/checknr.c b/usr/src/cmd/checknr/checknr.c
index fca907e2e8..8a8683ca30 100644
--- a/usr/src/cmd/checknr/checknr.c
+++ b/usr/src/cmd/checknr/checknr.c
@@ -13,7 +13,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
/*
* checknr: check an nroff/troff input file for matching macro calls.
@@ -190,7 +192,7 @@ char **argv;
#define TEXT_DOMAIN "SYS_TEST"
#endif
(void) textdomain(TEXT_DOMAIN);
- stk = (struct stkstr *)calloc(sizeof (struct stkstr), 100);
+ stk = (struct stkstr *)calloc(100, sizeof (struct stkstr));
maxstk = 100;
/* Figure out how many known commands there are */
while (knowncmds[ncmds])
diff --git a/usr/src/cmd/flowstat/flowstat.c b/usr/src/cmd/flowstat/flowstat.c
index ab1797922c..e772470f9d 100644
--- a/usr/src/cmd/flowstat/flowstat.c
+++ b/usr/src/cmd/flowstat/flowstat.c
@@ -27,6 +27,10 @@
* Copyright 2017 Joyent, Inc.
*/
+/*
+ * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+ */
+
#include <stdio.h>
#include <locale.h>
#include <stdarg.h>
@@ -426,7 +430,7 @@ query_flow_stats(dladm_handle_t handle, dladm_flow_attr_t *attr, void *arg)
prev_stat = flow_node->fc_stat;
/* Query library for current stats */
- curr_stat = dladm_flow_stat_query(flowname);
+ curr_stat = dladm_flow_stat_query(handle, flowname);
if (curr_stat == NULL)
goto done;
@@ -491,7 +495,7 @@ dump_one_flow_stats(dladm_handle_t handle, dladm_flow_attr_t *attr, void *arg)
char *flowname = attr->fa_flowname;
void *stat;
- stat = dladm_flow_stat_query_all(flowname);
+ stat = dladm_flow_stat_query_all(handle, flowname);
if (stat == NULL)
goto done;
print_all_stats(stat);
diff --git a/usr/src/cmd/fmtmsg/main.c b/usr/src/cmd/fmtmsg/main.c
index f7a00b12e1..eb4b7be4da 100644
--- a/usr/src/cmd/fmtmsg/main.c
+++ b/usr/src/cmd/fmtmsg/main.c
@@ -28,8 +28,9 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
/*
* fmtmsg.c
@@ -723,7 +724,7 @@ main(int argc, char **argv)
}
- if (!c_seen & !u_seen) class = MM_NULLMC;
+ if (!c_seen && !u_seen) class = MM_NULLMC;
diff --git a/usr/src/cmd/sgs/librtld_db/common/rtld_db.c b/usr/src/cmd/sgs/librtld_db/common/rtld_db.c
index 53f90f9c60..d863c0f3f4 100644
--- a/usr/src/cmd/sgs/librtld_db/common/rtld_db.c
+++ b/usr/src/cmd/sgs/librtld_db/common/rtld_db.c
@@ -23,8 +23,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
#include <stdlib.h>
#include <stdio.h>
@@ -162,7 +163,7 @@ rd_new(struct ps_prochandle *php)
rd_agent_t *rap;
LOG(ps_plog(MSG_ORIG(MSG_DB_RDNEW), php));
- if ((rap = (rd_agent_t *)calloc(sizeof (rd_agent_t), 1)) == NULL)
+ if ((rap = (rd_agent_t *)calloc(1, sizeof (rd_agent_t))) == NULL)
return (0);
rap->rd_psp = php;
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);