summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_aspath.c2
-rw-r--r--bgpd/bgp_clist.c2
-rw-r--r--bgpd/bgp_packet.c9
3 files changed, 6 insertions, 7 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index a781e70d2f..5766236a00 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -793,7 +793,7 @@ static int assegments_parse(struct stream *s, size_t length,
if (head)
prev->next = seg;
else /* it's the first segment */
- head = prev = seg;
+ head = seg;
for (i = 0; i < segh.length; i++)
seg->as[i] =
diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c
index 7ca48a5bea..18369002b8 100644
--- a/bgpd/bgp_clist.c
+++ b/bgpd/bgp_clist.c
@@ -44,7 +44,7 @@ static int64_t bgp_clist_new_seq_get(struct community_list *list)
int64_t newseq;
struct community_entry *entry;
- maxseq = newseq = 0;
+ maxseq = 0;
for (entry = list->head; entry; entry = entry->next) {
if (maxseq < entry->seq)
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 9d030378c7..790a8b71f8 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -1303,8 +1303,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size)
/* Open option part parse. */
if (optlen != 0) {
- if ((ret = bgp_open_option_parse(peer, optlen, &mp_capability))
- < 0)
+ if (bgp_open_option_parse(peer, optlen, &mp_capability) < 0)
return BGP_Stop;
} else {
if (bgp_debug_neighbor_events(peer))
@@ -1346,7 +1345,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size)
return BGP_Stop;
/* Get sockname. */
- if ((ret = bgp_getsockname(peer)) < 0) {
+ if (bgp_getsockname(peer) < 0) {
flog_err_sys(EC_LIB_SOCKET,
"%s: bgp_getsockname() failed for peer: %s",
__FUNCTION__, peer->host);
@@ -1972,13 +1971,13 @@ static int bgp_route_refresh_receive(struct peer *peer, bgp_size_t size)
} else
p_pnt = p_end;
- if ((ok = (p_pnt < p_end)))
+ if (p_pnt < p_end)
orfp.ge =
*p_pnt++; /* value
checked in
prefix_bgp_orf_set()
*/
- if ((ok = (p_pnt < p_end)))
+ if (p_pnt < p_end)
orfp.le =
*p_pnt++; /* value
checked in