summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSimon Buttgereit <simon.buttgereit@gmail.com>2017-02-08 08:14:40 (GMT)
committerThomas Haller <thaller@redhat.com>2017-02-27 15:43:48 (GMT)
commit83e10beabc4c55a917606e4bd13b7b85ddd1ebe2 (patch)
tree8d454c0c8ae00a18c4f54c550ba33119dcdf32f3 /lib
parent7b1fb399a3c64cf7f5025fe99c7089f2bc0166bf (diff)
downloadlibnl-83e10beabc4c55a917606e4bd13b7b85ddd1ebe2.zip
libnl-83e10beabc4c55a917606e4bd13b7b85ddd1ebe2.tar.gz
libnl-83e10beabc4c55a917606e4bd13b7b85ddd1ebe2.tar.bz2
fix of boolean operators
Mixed up boolean operators in commit f38fb7a. This commit is the appropriate fix.
Diffstat (limited to 'lib')
-rw-r--r--lib/xfrm/sp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/xfrm/sp.c b/lib/xfrm/sp.c
index 46699dd..cb51861 100644
--- a/lib/xfrm/sp.c
+++ b/lib/xfrm/sp.c
@@ -765,8 +765,8 @@ static int build_xfrm_sp_message(struct xfrmnl_sp *tmpl, int cmd, int flags, str
uint32_t len;
struct nl_addr* addr;
- if (!(tmpl->ce_mask & XFRM_SP_ATTR_DIR) &&
- (!(tmpl->ce_mask & XFRM_SP_ATTR_INDEX) ||
+ if (!(tmpl->ce_mask & XFRM_SP_ATTR_DIR) ||
+ (!(tmpl->ce_mask & XFRM_SP_ATTR_INDEX) &&
!(tmpl->ce_mask & XFRM_SP_ATTR_SEL)))
return -NLE_MISSING_ATTR;
@@ -958,8 +958,8 @@ static int build_xfrm_sp_delete_message(struct xfrmnl_sp *tmpl, int cmd, int fla
struct nl_addr* addr;
uint32_t len;
- if (!(tmpl->ce_mask & XFRM_SP_ATTR_DIR) &&
- (!(tmpl->ce_mask & XFRM_SP_ATTR_INDEX) ||
+ if (!(tmpl->ce_mask & XFRM_SP_ATTR_DIR) ||
+ (!(tmpl->ce_mask & XFRM_SP_ATTR_INDEX) &&
!(tmpl->ce_mask & XFRM_SP_ATTR_SEL)))
return -NLE_MISSING_ATTR;