summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-01-24 11:46:56 +0200
committerToomas Soome <tsoome@me.com>2020-02-20 19:08:49 +0200
commitfd82d5a2825fb57d2940ba210af4af02e09883d3 (patch)
treeaf07432d4ebe84d07ba4df41399f49bcf2310b0c
parent51d7c47a2ff052304a62dd7442303287396ae711 (diff)
downloadillumos-joyent-fd82d5a2825fb57d2940ba210af4af02e09883d3.tar.gz
12321 spdsock: smatch errors
Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Dan McDonald <danmcd@joyent.com> Approved by: Robert Mustacchi <rm@fingolfin.org>
-rw-r--r--usr/src/uts/common/inet/ip/spdsock.c12
-rw-r--r--usr/src/uts/intel/spdsock/Makefile21
-rw-r--r--usr/src/uts/sparc/spdsock/Makefile19
3 files changed, 9 insertions, 43 deletions
diff --git a/usr/src/uts/common/inet/ip/spdsock.c b/usr/src/uts/common/inet/ip/spdsock.c
index 1ae2279dcf..a57f7fd5ac 100644
--- a/usr/src/uts/common/inet/ip/spdsock.c
+++ b/usr/src/uts/common/inet/ip/spdsock.c
@@ -2773,10 +2773,14 @@ spdsock_do_updatealg(spd_ext_t *extv[], spd_stack_t *spds)
bail:
/* cleanup */
ipsec_alg_free(alg);
- for (alg_type = 0; alg_type < IPSEC_NALGTYPES; alg_type++)
- for (algid = 0; algid < IPSEC_MAX_ALGS; algid++)
- if (spds->spds_algs[alg_type][algid] != NULL)
- ipsec_alg_free(spds->spds_algs[alg_type][algid]);
+ for (alg_type = 0; alg_type < IPSEC_NALGTYPES; alg_type++) {
+ for (algid = 0; algid < IPSEC_MAX_ALGS; algid++) {
+ if (spds->spds_algs[alg_type][algid] != NULL) {
+ ipsec_alg_free(
+ spds->spds_algs[alg_type][algid]);
+ }
+ }
+ }
return (diag);
}
diff --git a/usr/src/uts/intel/spdsock/Makefile b/usr/src/uts/intel/spdsock/Makefile
index fdc5ffad05..98adb5a6ea 100644
--- a/usr/src/uts/intel/spdsock/Makefile
+++ b/usr/src/uts/intel/spdsock/Makefile
@@ -35,7 +35,6 @@ UTSBASE = ../..
#
MODULE = spdsock
OBJECTS = $(SPDSOCK_OBJS:%=$(OBJS_DIR)/%)
-LINTS = $(SPDSOCK_OBJS:%.o=$(LINTS_DIR)/%.ln)
ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
CONF_SRCDIR = $(UTSBASE)/common/inet/ip
@@ -48,7 +47,6 @@ include $(UTSBASE)/intel/Makefile.intel
# Define targets
#
ALL_TARGET = $(BINARY) $(SRC_CONFFILE)
-LINT_TARGET = $(MODULE).lint
INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
#
@@ -58,21 +56,8 @@ LDFLAGS += -dy -Ndrv/ip
INC_PATH += -I$(UTSBASE)/common/io/bpf
-#
-# For now, disable these lint checks; maintainers should endeavor
-# to investigate and remove these for maximum lint coverage.
-# Please do not carry these forward to new Makefiles.
-#
-LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
-LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
-LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
-
CERRWARN += $(CNOWARN_UNINIT)
-# needs work
-$(OBJS_DIR)/spdsockddi.o := SMOFF += index_overflow
-$(OBJS_DIR)/spdsock.o := SMOFF += no_if_block
-
#
# Default build targets.
#
@@ -86,12 +71,6 @@ clean: $(CLEAN_DEPS) $(SISCLEAN_DEPS)
clobber: $(CLOBBER_DEPS) $(SISCLEAN_DEPS)
-lint: $(LINT_DEPS)
-
-modlintlib: $(MODLINTLIB_DEPS)
-
-clean.lint: $(CLEAN_LINT_DEPS)
-
install: $(INSTALL_DEPS) $(SISCHECK_DEPS)
#
diff --git a/usr/src/uts/sparc/spdsock/Makefile b/usr/src/uts/sparc/spdsock/Makefile
index 1c0bbcb2d8..21b7d7c667 100644
--- a/usr/src/uts/sparc/spdsock/Makefile
+++ b/usr/src/uts/sparc/spdsock/Makefile
@@ -23,7 +23,7 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# This makefile drives the production of the spdsock driver
+# This makefile drives the production of the spdsock driver
# kernel module.
#
# sparc architecture dependent
@@ -39,7 +39,6 @@ UTSBASE = ../..
#
MODULE = spdsock
OBJECTS = $(SPDSOCK_OBJS:%=$(OBJS_DIR)/%)
-LINTS = $(SPDSOCK_OBJS:%.o=$(LINTS_DIR)/%.ln)
ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
CONF_SRCDIR = $(UTSBASE)/common/inet/ip
@@ -52,7 +51,6 @@ include $(UTSBASE)/sparc/Makefile.sparc
# Define targets
#
ALL_TARGET = $(BINARY) $(SRC_CONFFILE)
-LINT_TARGET = $(MODULE).lint
INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
#
@@ -70,15 +68,6 @@ INC_PATH += -I$(UTSBASE)/common/io/bpf
#
CFLAGS += $(CCVERBOSE)
-#
-# For now, disable these lint checks; maintainers should endeavor
-# to investigate and remove these for maximum lint coverage.
-# Please do not carry these forward to new Makefiles.
-#
-LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
-LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
-LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
-
CERRWARN += $(CNOWARN_UNINIT)
#
@@ -94,12 +83,6 @@ clean: $(CLEAN_DEPS) $(SISCLEAN_DEPS)
clobber: $(CLOBBER_DEPS) $(SISCLEAN_DEPS)
-lint: $(LINT_DEPS)
-
-modlintlib: $(MODLINTLIB_DEPS)
-
-clean.lint: $(CLEAN_LINT_DEPS)
-
install: $(INSTALL_DEPS) $(SISCHECK_DEPS)
#