mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 14:29:47 +00:00
ldpd: Cleanup set but unused variables
There existed some variables set but never used. Clean this up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
5037cc3eb4
commit
f67de3ee72
@ -67,7 +67,7 @@ send_address(struct nbr *nbr, int af, struct if_addr_head *addr_list,
|
||||
fatalx("send_address: unknown af");
|
||||
}
|
||||
|
||||
while ((if_addr = LIST_FIRST(addr_list)) != NULL) {
|
||||
while (LIST_FIRST(addr_list) != NULL) {
|
||||
/*
|
||||
* Send as many addresses as possible - respect the session's
|
||||
* negotiated maximum pdu length.
|
||||
|
17
ldpd/ldpd.c
17
ldpd/ldpd.c
@ -858,7 +858,6 @@ ldp_acl_request(struct imsgev *iev, char *acl_name, int af,
|
||||
union ldpd_addr *addr, uint8_t prefixlen)
|
||||
{
|
||||
struct imsg imsg;
|
||||
ssize_t n;
|
||||
struct acl_check acl_check;
|
||||
|
||||
if (acl_name[0] == '\0')
|
||||
@ -876,9 +875,9 @@ ldp_acl_request(struct imsgev *iev, char *acl_name, int af,
|
||||
imsg_flush(&iev->ibuf);
|
||||
|
||||
/* receive (blocking) and parse result */
|
||||
if ((n = imsg_read(&iev->ibuf)) == -1)
|
||||
if (imsg_read(&iev->ibuf) == -1)
|
||||
fatal("imsg_read error");
|
||||
if ((n = imsg_get(&iev->ibuf, &imsg)) == -1)
|
||||
if (imsg_get(&iev->ibuf, &imsg) == -1)
|
||||
fatal("imsg_get");
|
||||
if (imsg.hdr.type != IMSG_ACL_CHECK ||
|
||||
imsg.hdr.len != IMSG_HEADER_SIZE + sizeof(int))
|
||||
@ -1408,7 +1407,7 @@ merge_ifaces(struct ldpd_conf *conf, struct ldpd_conf *xconf)
|
||||
|
||||
RB_FOREACH_SAFE(iface, iface_head, &conf->iface_tree, itmp) {
|
||||
/* find deleted interfaces */
|
||||
if ((xi = if_lookup_name(xconf, iface->name)) == NULL) {
|
||||
if (if_lookup_name(xconf, iface->name) == NULL) {
|
||||
switch (ldpd_process) {
|
||||
case PROC_LDP_ENGINE:
|
||||
ldpe_if_exit(iface);
|
||||
@ -1469,7 +1468,7 @@ merge_tnbrs(struct ldpd_conf *conf, struct ldpd_conf *xconf)
|
||||
continue;
|
||||
|
||||
/* find deleted tnbrs */
|
||||
if ((xt = tnbr_find(xconf, tnbr->af, &tnbr->addr)) == NULL) {
|
||||
if (tnbr_find(xconf, tnbr->af, &tnbr->addr) == NULL) {
|
||||
switch (ldpd_process) {
|
||||
case PROC_LDP_ENGINE:
|
||||
tnbr->flags &= ~F_TNBR_CONFIGURED;
|
||||
@ -1624,7 +1623,7 @@ merge_l2vpns(struct ldpd_conf *conf, struct ldpd_conf *xconf)
|
||||
|
||||
RB_FOREACH_SAFE(l2vpn, l2vpn_head, &conf->l2vpn_tree, ltmp) {
|
||||
/* find deleted l2vpns */
|
||||
if ((xl = l2vpn_find(xconf, l2vpn->name)) == NULL) {
|
||||
if (l2vpn_find(xconf, l2vpn->name) == NULL) {
|
||||
switch (ldpd_process) {
|
||||
case PROC_LDE_ENGINE:
|
||||
l2vpn_exit(l2vpn);
|
||||
@ -1680,7 +1679,7 @@ merge_l2vpn(struct ldpd_conf *xconf, struct l2vpn *l2vpn, struct l2vpn *xl)
|
||||
/* merge intefaces */
|
||||
RB_FOREACH_SAFE(lif, l2vpn_if_head, &l2vpn->if_tree, ftmp) {
|
||||
/* find deleted interfaces */
|
||||
if ((xf = l2vpn_if_find(xl, lif->ifname)) == NULL) {
|
||||
if (l2vpn_if_find(xl, lif->ifname) == NULL) {
|
||||
RB_REMOVE(l2vpn_if_head, &l2vpn->if_tree, lif);
|
||||
free(lif);
|
||||
}
|
||||
@ -1706,7 +1705,7 @@ merge_l2vpn(struct ldpd_conf *xconf, struct l2vpn *l2vpn, struct l2vpn *xl)
|
||||
/* merge active pseudowires */
|
||||
RB_FOREACH_SAFE(pw, l2vpn_pw_head, &l2vpn->pw_tree, ptmp) {
|
||||
/* find deleted active pseudowires */
|
||||
if ((xp = l2vpn_pw_find_active(xl, pw->ifname)) == NULL) {
|
||||
if (l2vpn_pw_find_active(xl, pw->ifname) == NULL) {
|
||||
switch (ldpd_process) {
|
||||
case PROC_LDE_ENGINE:
|
||||
l2vpn_pw_exit(pw);
|
||||
@ -1807,7 +1806,7 @@ merge_l2vpn(struct ldpd_conf *xconf, struct l2vpn *l2vpn, struct l2vpn *xl)
|
||||
/* merge inactive pseudowires */
|
||||
RB_FOREACH_SAFE(pw, l2vpn_pw_head, &l2vpn->pw_inactive_tree, ptmp) {
|
||||
/* find deleted inactive pseudowires */
|
||||
if ((xp = l2vpn_pw_find_inactive(xl, pw->ifname)) == NULL) {
|
||||
if (l2vpn_pw_find_inactive(xl, pw->ifname) == NULL) {
|
||||
RB_REMOVE(l2vpn_pw_head, &l2vpn->pw_inactive_tree, pw);
|
||||
free(pw);
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ sock_set_nonblock(int fd)
|
||||
|
||||
flags |= O_NONBLOCK;
|
||||
|
||||
if ((flags = fcntl(fd, F_SETFL, flags)) == -1)
|
||||
if (fcntl(fd, F_SETFL, flags) == -1)
|
||||
fatal("fcntl F_SETFL");
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ sock_set_cloexec(int fd)
|
||||
|
||||
flags |= FD_CLOEXEC;
|
||||
|
||||
if ((flags = fcntl(fd, F_SETFD, flags)) == -1)
|
||||
if (fcntl(fd, F_SETFD, flags) == -1)
|
||||
fatal("fcntl F_SETFD");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user