From 0663b557d8c7575927b005cab08d9f19c8b98c25 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Fri, 18 Nov 2022 15:41:03 +0200 Subject: 15200 libdladm: error: '&&' within '||' Reviewed by: Andy Fiddaman Reviewed by: Marco van Wieringen Approved by: Gordon Ross --- usr/src/lib/libdladm/Makefile.com | 1 - usr/src/lib/libdladm/common/libdladm.c | 2 +- usr/src/lib/libdladm/common/libdlbridge.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) (limited to 'usr/src/lib') diff --git a/usr/src/lib/libdladm/Makefile.com b/usr/src/lib/libdladm/Makefile.com index 55dee6aa2a..d87b431552 100644 --- a/usr/src/lib/libdladm/Makefile.com +++ b/usr/src/lib/libdladm/Makefile.com @@ -43,7 +43,6 @@ LDLIBS += -ldevinfo -lc -linetutil -lsocket -lscf -lrcm -lnvpair \ SRCDIR = ../common CFLAGS += $(CCVERBOSE) -CERRWARN += -_gcc=-Wno-parentheses CERRWARN += $(CNOWARN_UNINIT) CPPFLAGS += -I$(SRCDIR) -D_REENTRANT diff --git a/usr/src/lib/libdladm/common/libdladm.c b/usr/src/lib/libdladm/common/libdladm.c index b7ea20ebac..91f0e6c07d 100644 --- a/usr/src/lib/libdladm/common/libdladm.c +++ b/usr/src/lib/libdladm/common/libdladm.c @@ -1148,7 +1148,7 @@ dladm_strs2range(char **prop_val, uint_t val_cnt, mac_propval_type_t type, if (*endp++ != '-') return (DLADM_STATUS_BADRANGE); ur->mpur_max = strtol(endp, &endp, 10); - if (endp != NULL && *endp != '\0' || + if ((endp != NULL && *endp != '\0') || ur->mpur_max < ur->mpur_min) return (DLADM_STATUS_BADRANGE); } diff --git a/usr/src/lib/libdladm/common/libdlbridge.c b/usr/src/lib/libdladm/common/libdlbridge.c index aaf2fede13..1c759aa98b 100644 --- a/usr/src/lib/libdladm/common/libdlbridge.c +++ b/usr/src/lib/libdladm/common/libdlbridge.c @@ -933,7 +933,7 @@ dladm_bridge_configure(dladm_handle_t handle, const char *name, if ((tran = scf_transaction_create(sstate.ss_handle)) == NULL) goto out; - if (cfg->field_mask & BR_CFG_ALL) { + if (cfg->field_mask & (BR_CFG_ALL)) { if ((sstate.ss_pg = scf_pg_create(sstate.ss_handle)) == NULL) goto out; if (scf_instance_add_pg(sstate.ss_inst, "config", -- cgit v1.2.3