summaryrefslogtreecommitdiff
path: root/bgpd/bgp_mpath.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-06-29 14:53:39 +0300
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-06-29 22:27:50 +0300
commit4953391b450351794a0cf646aa8bf9fea9869df8 (patch)
tree10504909a60c60bc81bc11e18fd0d17b90cc46e8 /bgpd/bgp_mpath.c
parentd4980edf47501007a4c76b988db01b1d95c3b8df (diff)
bgpd: Avoid more assignments within checks (round 2)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_mpath.c')
-rw-r--r--bgpd/bgp_mpath.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c
index d5fce115de..8127428bc7 100644
--- a/bgpd/bgp_mpath.c
+++ b/bgpd/bgp_mpath.c
@@ -411,7 +411,8 @@ static void bgp_path_info_mpath_lb_update(struct bgp_path_info *path, bool set,
{
struct bgp_path_info_mpath *mpath;
- if ((mpath = path->mpath) == NULL) {
+ mpath = path->mpath;
+ if (mpath == NULL) {
if (!set || (cum_bw == 0 && !all_paths_lb))
return;