aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-08 17:56:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-08 17:56:54 +0000
commit012039fd559e6b100b47053c662759ad7ca0ddf0 (patch)
treecd3e03634d3d90d5bed5108a45eb2f0cc3580bc6
parent81241f28284a6cb0589238d5a46bf48531da2b10 (diff)
downloadsrc-012039fd559e6b100b47053c662759ad7ca0ddf0.tar.gz
src-012039fd559e6b100b47053c662759ad7ca0ddf0.zip
Fix logic error in gvinum's gv_set_sd_state()
With clang 4.0.0, I'm getting the following warnings: sys/geom/vinum/geom_vinum_state.c:186:7: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] if (!flags & GV_SETSTATE_FORCE) ^ ~ The logical not operator should obiously be called after masking. Reviewed by: mav, pfg MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D9093
Notes
Notes: svn path=/head/; revision=311688
-rw-r--r--sys/geom/vinum/geom_vinum_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/vinum/geom_vinum_state.c b/sys/geom/vinum/geom_vinum_state.c
index 568c784fdce7..67486dad16d4 100644
--- a/sys/geom/vinum/geom_vinum_state.c
+++ b/sys/geom/vinum/geom_vinum_state.c
@@ -183,7 +183,7 @@ gv_set_sd_state(struct gv_sd *s, int newstate, int flags)
* Only do this if we're forced, since it usually is done
* internally, and then we do use the force flag.
*/
- if (!flags & GV_SETSTATE_FORCE)
+ if (!(flags & GV_SETSTATE_FORCE))
return (GV_ERR_SETSTATE);
break;