diff options
author | Sirshak Das <sirshak.das@arm.com> | 2018-06-11 11:40:17 -0500 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-06-13 08:00:59 +0000 |
commit | 8a4a8c455aaa95a7ff15d8d46f52b24740d3ce88 (patch) | |
tree | 5999c8241165aec27f91e20e9a90822db67eaa00 /src | |
parent | af86a48733c548931f8983984328b906f7e7aef8 (diff) |
Fix clang compilation on aarch64: extraneous parentheses
Fixes clang error: equality comparison with extraneous parentheses
Changing all the #defines to inlines.
Change-Id: I30a931679ac3325b23b249b1ae28c7c8cf54b012
Signed-off-by: Sirshak Das<sirshak.das@arm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lb/lb.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/plugins/lb/lb.h b/src/plugins/lb/lb.h index 1526298b0fa..c6773a4108f 100644 --- a/src/plugins/lb/lb.h +++ b/src/plugins/lb/lb.h @@ -312,17 +312,27 @@ typedef struct { #define lb_vip_is_gre6(vip) ((vip)->type == LB_VIP_TYPE_IP6_GRE6 \ || (vip)->type == LB_VIP_TYPE_IP4_GRE6) -#define lb_vip_is_l3dsr(vip) ((vip)->type == LB_VIP_TYPE_IP4_L3DSR) - -#define lb_vip_is_nat4(vip) ((vip)->type == LB_VIP_TYPE_IP4_NAT4) - -#define lb_vip_is_nat6(vip) ((vip)->type == LB_VIP_TYPE_IP6_NAT6) - #define lb_encap_is_ip4(vip) ((vip)->type == LB_VIP_TYPE_IP6_GRE4 \ || (vip)->type == LB_VIP_TYPE_IP4_GRE4 \ || (vip)->type == LB_VIP_TYPE_IP4_L3DSR \ || (vip)->type == LB_VIP_TYPE_IP4_NAT4 ) +always_inline bool +lb_vip_is_l3dsr(const lb_vip_t *vip) +{ + return vip->type == LB_VIP_TYPE_IP4_L3DSR; +} +always_inline bool +lb_vip_is_nat4(const lb_vip_t *vip) +{ + return vip->type == LB_VIP_TYPE_IP4_NAT4; +} +always_inline bool +lb_vip_is_nat6(const lb_vip_t *vip) +{ + return vip->type == LB_VIP_TYPE_IP6_NAT6; +} + format_function_t format_lb_vip; format_function_t format_lb_vip_detailed; |