summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_clist.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c
index 48fc8474db..886de9e50c 100644
--- a/bgpd/bgp_clist.c
+++ b/bgpd/bgp_clist.c
@@ -450,8 +450,7 @@ static char *lcommunity_str_get(struct lcommunity *lcom, int i)
u_char *ptr;
char *pnt;
- ptr = lcom->val;
- ptr += (i * LCOMMUNITY_SIZE);
+ ptr = lcom->val + (i * LCOMMUNITY_SIZE);
memcpy(&lcomval, ptr, LCOMMUNITY_SIZE);