summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2017-06-23 23:07:12 +0000
committerRobert Mustacchi <rm@joyent.com>2017-07-15 15:54:09 +0000
commit1c3d0b01c6a9078d5a582708598711587ecf8deb (patch)
tree6e2f317a35c401bdeb2ac5021be024928e99c9f7
parent52d28bab63de304d83abb589be8ad5c91822a41e (diff)
downloadillumos-joyent-1c3d0b01c6a9078d5a582708598711587ecf8deb.tar.gz
Fix compiler warnings in qede_cfg.c
../../common/io/qede/qede_cfg.c: In function 'qede_cfg_init': ../../common/io/qede/qede_cfg.c:195: error: comparison of unsigned expression < 0 is always false [-Wtype-limits] ../../common/io/qede/qede_cfg.c:200: error: comparison of unsigned expression < 0 is always false [-Wtype-limits] The problem here is that the case was on the wrong side of the comparison.
-rw-r--r--usr/src/uts/common/io/qede/qede_cfg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/qede/qede_cfg.c b/usr/src/uts/common/io/qede/qede_cfg.c
index 1a6f0e0bf5..d597136b61 100644
--- a/usr/src/uts/common/io/qede/qede_cfg.c
+++ b/usr/src/uts/common/io/qede/qede_cfg.c
@@ -192,12 +192,12 @@ void qede_cfg_init(qede_t *qede)
qede_cfg_get_val(qede, "debug_level", &option,
qede->ecore_debug_level,
B_FALSE);
- qede->ecore_debug_level = ((uint32_t)option < 0) ? 0 : option;
+ qede->ecore_debug_level = (uint32_t)((option < 0) ? 0 : option);
qede_cfg_get_val(qede, "debug_module", &option,
qede->ecore_debug_module,
B_FALSE);
- qede->ecore_debug_module = ((uint32_t)option < 0) ? 0 : option;
+ qede->ecore_debug_module = (uint32_t)((option < 0) ? 0 : option);
}