summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Telka <marcel@telka.sk>2020-01-24 17:59:49 +0100
committerDan McDonald <danmcd@joyent.com>2020-01-27 09:47:00 -0500
commitecaa37affc4da0ba0f1331de875432d68cf70a80 (patch)
treeba5b66d42a1ea5653e14c1b7a752474dae70d974
parent5ca82e6914c4162ba9b7028b19c9d77d3eadaf17 (diff)
downloadillumos-joyent-ecaa37affc4da0ba0f1331de875432d68cf70a80.tar.gz
12201 Enable smatch for zonestat and zonestatd
Reviewed by: C Fraire <seeemef@mac.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/zonestat/zonestat/Makefile5
-rw-r--r--usr/src/cmd/zonestat/zonestat/zonestat.c2
-rw-r--r--usr/src/cmd/zonestat/zonestatd/Makefile11
3 files changed, 6 insertions, 12 deletions
diff --git a/usr/src/cmd/zonestat/zonestat/Makefile b/usr/src/cmd/zonestat/zonestat/Makefile
index a8b62f65d3..96bc8c5e5e 100644
--- a/usr/src/cmd/zonestat/zonestat/Makefile
+++ b/usr/src/cmd/zonestat/zonestat/Makefile
@@ -29,14 +29,11 @@ OBJS = $(SRCS:%.c=%.o)
include ../../Makefile.cmd
-LDLIBS += -lscf -lzonestat -lumem
+LDLIBS += -lscf -lzonestat -lumem
LINTFLAGS += -u
CERRWARN += $(CNOWARN_UNINIT)
-# not linted
-SMATCH=off
-
.KEEP_STATE:
.PARALLEL:
diff --git a/usr/src/cmd/zonestat/zonestat/zonestat.c b/usr/src/cmd/zonestat/zonestat/zonestat.c
index b66612ee10..fac6f97371 100644
--- a/usr/src/cmd/zonestat/zonestat/zonestat.c
+++ b/usr/src/cmd/zonestat/zonestat/zonestat.c
@@ -2358,7 +2358,7 @@ main(int argc, char *argv[])
}
}
- if (opt_line_any & (!opt_parseable)) {
+ if (opt_line_any && (!opt_parseable)) {
(void) zonestat_error(gettext("-P requires -p"));
return (zonestat_usage(B_FALSE));
}
diff --git a/usr/src/cmd/zonestat/zonestatd/Makefile b/usr/src/cmd/zonestat/zonestatd/Makefile
index 727c71148c..de4b2fc4b6 100644
--- a/usr/src/cmd/zonestat/zonestatd/Makefile
+++ b/usr/src/cmd/zonestat/zonestatd/Makefile
@@ -35,16 +35,13 @@ ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
SRCS = zonestatd.c
CPPFLAGS += -I$(ADJUNCT_PROTO)/usr/include/libxml2
-LDLIBS += -lkstat -lpool -lexacct -lscf \
+LDLIBS += -lkstat -lpool -lexacct -lscf \
-lcontract -lcmdutils -lumem
LINTFLAGS += -u
-CERRWARN += -_gcc=-Wno-parentheses
-CERRWARN += -_gcc=-Wno-unused-label
-CERRWARN += $(CNOWARN_UNINIT)
-
-# not linted
-SMATCH=off
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += $(CNOWARN_UNINIT)
OBJS = $(SRCS:%.c=%.o)