diff options
author | Toomas Soome <tsoome@me.com> | 2022-11-18 15:41:03 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-12-16 10:51:37 +0200 |
commit | 0663b557d8c7575927b005cab08d9f19c8b98c25 (patch) | |
tree | 52163027e65dd343fbbd763cbc7bf93ca49b11cc | |
parent | bf7adeeaefd6f9806398f446e4b87af240a6770e (diff) | |
download | illumos-gate-0663b557d8c7575927b005cab08d9f19c8b98c25.tar.gz |
15200 libdladm: error: '&&' within '||'
Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
Reviewed by: Marco van Wieringen <mvw@planets.elm.net>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
-rw-r--r-- | usr/src/lib/libdladm/Makefile.com | 1 | ||||
-rw-r--r-- | usr/src/lib/libdladm/common/libdladm.c | 2 | ||||
-rw-r--r-- | usr/src/lib/libdladm/common/libdlbridge.c | 2 |
3 files changed, 2 insertions, 3 deletions
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", |