Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db404b13 authored by Mark Rustad's avatar Mark Rustad Committed by David S. Miller
Browse files

genl_magic: Resolve logical-op warnings



Resolve "logical 'and' applied to non-boolean constant" warnings"
that appear in W=2 builds by adding !! to a bit test.

Signed-off-by: default avatarMark Rustad <mark.d.rustad@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e53da5fb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -178,12 +178,12 @@ static int s_name ## _from_attrs_for_change(struct s_name *s, \
#define __assign(attr_nr, attr_flag, name, nla_type, type, assignment...)	\
		nla = ntb[attr_nr];						\
		if (nla) {						\
			if (exclude_invariants && ((attr_flag) & DRBD_F_INVARIANT)) {		\
			if (exclude_invariants && !!((attr_flag) & DRBD_F_INVARIANT)) {		\
				pr_info("<< must not change invariant attr: %s\n", #name);	\
				return -EEXIST;				\
			}						\
			assignment;					\
		} else if (exclude_invariants && ((attr_flag) & DRBD_F_INVARIANT)) {		\
		} else if (exclude_invariants && !!((attr_flag) & DRBD_F_INVARIANT)) {		\
			/* attribute missing from payload, */		\
			/* which was expected */			\
		} else if ((attr_flag) & DRBD_F_REQUIRED) {		\