diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-09-13 14:35:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-13 14:35:47 +0200 |
commit | 38ee5e636d116891b56327577de63ccb17d2bb05 (patch) | |
tree | 67f22e0622da148fcdc5e154c1c0d98bda31e937 /pimd | |
parent | Merge pull request #3013 from pacovn/static_analysis__conditional_omitted_ope... (diff) | |
parent | pimd ripd ripngd: variable shadowing fixes (diff) | |
download | frr-38ee5e636d116891b56327577de63ccb17d2bb05.tar.xz frr-38ee5e636d116891b56327577de63ccb17d2bb05.zip |
Merge pull request #3009 from pacovn/static_analysis__shadow_variables3
pimd ripd ripngd: variable shadowing fixes
Diffstat (limited to 'pimd')
-rw-r--r-- | pimd/mtracebis_netlink.c | 8 | ||||
-rw-r--r-- | pimd/pim_ifchannel.c | 3 | ||||
-rw-r--r-- | pimd/pim_pim.c | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/pimd/mtracebis_netlink.c b/pimd/mtracebis_netlink.c index 30ee8f24a..47b5f7e52 100644 --- a/pimd/mtracebis_netlink.c +++ b/pimd/mtracebis_netlink.c @@ -243,7 +243,7 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth, break; /* process next filter */ } if (h->nlmsg_type == NLMSG_ERROR) { - struct nlmsgerr *err = + struct nlmsgerr *merr = (struct nlmsgerr *)NLMSG_DATA( h); if (h->nlmsg_len @@ -252,7 +252,7 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth, fprintf(stderr, "ERROR truncated\n"); } else { - errno = -err->error; + errno = -merr->error; perror("RTNETLINK answers"); } return -1; @@ -379,12 +379,12 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, } if (h->nlmsg_type == NLMSG_ERROR) { - struct nlmsgerr *err = + struct nlmsgerr *merr = (struct nlmsgerr *)NLMSG_DATA(h); if (l < (int)sizeof(struct nlmsgerr)) { fprintf(stderr, "ERROR truncated\n"); } else { - errno = -err->error; + errno = -merr->error; if (errno == 0) { if (answer) memcpy(answer, h, diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index 313734503..a3d6a2e65 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -1115,7 +1115,8 @@ void pim_ifchannel_local_membership_del(struct interface *ifp, struct channel_oil *c_oil = child->channel_oil; struct pim_ifchannel *chchannel = pim_ifchannel_find(ifp, &child->sg); - struct pim_interface *pim_ifp = ifp->info; + + pim_ifp = ifp->info; if (PIM_DEBUG_EVENTS) zlog_debug("%s %s: Prune(S,G)=%s(%s) from %s", diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c index d5ee30fb2..cf078064d 100644 --- a/pimd/pim_pim.c +++ b/pimd/pim_pim.c @@ -573,8 +573,6 @@ int pim_msg_send(int fd, struct in_addr src, struct in_addr dst, ip->ip_len = htons(sendlen); if (PIM_DEBUG_PIM_PACKETS) { - struct pim_msg_header *header = - (struct pim_msg_header *)pim_msg; char dst_str[INET_ADDRSTRLEN]; pim_inet4_dump("<dst?>", dst, dst_str, sizeof(dst_str)); zlog_debug("%s: to %s on %s: msg_size=%d checksum=%x", |