diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-05-12 23:25:37 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-05-12 23:25:37 +0000 |
commit | 34c3f81b542c7f91fa04a43f7d0a8a4482f22d4d (patch) | |
tree | 58f05fdafbc1c2036b9ccdf9de01d77f503e510e | |
parent | 5fc60519ede0d34688832e353c35bf1832a4330d (diff) |
[bgpd] Remove dead code in ORIGINATOR_ID packet forming code
2006-05-12 Paul Jakma <paul.jakma@sun.com>
* bgp_attr.c: (bgp_packet_attribute) Remove dead code, Coverity
CID #1
-rw-r--r-- | bgpd/ChangeLog | 5 | ||||
-rw-r--r-- | bgpd/bgp_attr.c | 9 |
2 files changed, 7 insertions, 7 deletions
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog index 21a4a56b..437d51cd 100644 --- a/bgpd/ChangeLog +++ b/bgpd/ChangeLog @@ -1,3 +1,8 @@ +2006-05-12 Paul Jakma <paul.jakma@sun.com> + + * bgp_attr.c: (bgp_packet_attribute) Remove dead code, Coverity + CID #1 + 2006-05-08 Paul Jakma <paul.jakma@sun.com> * bgp_community.c: (community_str2com) Coverity CID#62, fix diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index e9dde0fd..4c72d80a 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -1505,13 +1505,8 @@ bgp_packet_attribute (struct bgp *bgp, struct peer *peer, if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_ORIGINATOR_ID)) stream_put_in_addr (s, &attr->originator_id); - else - { - if (from) - stream_put_in_addr (s, &from->remote_id); - else - stream_put_in_addr (s, &attr->originator_id); - } + else + stream_put_in_addr (s, &from->remote_id); /* Cluster list. */ stream_putc (s, BGP_ATTR_FLAG_OPTIONAL); |