summaryrefslogtreecommitdiffstats
path: root/vrrpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2020-03-04 14:04:23 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2020-03-04 14:04:23 +0100
commita8f58eb6a5e04aeb8600467026b55c86d2f971da (patch)
tree10136a824eb9df5cecb9600a236f5873c7d78420 /vrrpd
parenttools: Add coccinelle script to check if bool functions return bool type (diff)
downloadfrr-a8f58eb6a5e04aeb8600467026b55c86d2f971da.tar.xz
frr-a8f58eb6a5e04aeb8600467026b55c86d2f971da.zip
*: Use short version of bool expressions
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'vrrpd')
-rw-r--r--vrrpd/vrrp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index 03a08dd86..cb17759de 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -953,7 +953,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src,
thread_add_timer_msec(
master, vrrp_master_down_timer_expire, r,
r->skew_time * CS2MS, &r->t_master_down_timer);
- } else if (r->vr->preempt_mode == false
+ } else if (!r->vr->preempt_mode
|| pkt->hdr.priority >= r->priority) {
if (r->vr->version == 3) {
r->master_adver_interval =
@@ -965,7 +965,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src,
vrrp_master_down_timer_expire, r,
r->master_down_interval * CS2MS,
&r->t_master_down_timer);
- } else if (r->vr->preempt_mode == true
+ } else if (r->vr->preempt_mode
&& pkt->hdr.priority < r->priority) {
/* Discard advertisement */
DEBUGD(&vrrp_dbg_proto,
@@ -1834,7 +1834,7 @@ static int vrrp_autoconfig_if_add(struct interface *ifp)
created = true;
}
- if (!vr || vr->autoconf == false)
+ if (!vr || !vr->autoconf)
return 0;
if (!created) {