From: David Lamparter Date: Mon, 7 Mar 2022 16:36:00 +0000 (+0100) Subject: zebra: remove unused variable X-Git-Tag: pim6-testing-20220430~257^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=378260fb654aba16d8d9c52223966d8c909efbf6;p=matthieu%2Ffrr.git zebra: remove unused variable clang complains "variable 'curr_length' set but not used". Signed-off-by: David Lamparter --- diff --git a/zebra/zebra_netns_id.c b/zebra/zebra_netns_id.c index 81d610940d..739ba33036 100644 --- a/zebra/zebra_netns_id.c +++ b/zebra/zebra_netns_id.c @@ -136,7 +136,6 @@ static ns_id_t extract_nsid(struct nlmsghdr *nlh, char *buf) ns_id_t ns_id = NS_UNKNOWN; int offset = NETLINK_ALIGN(sizeof(struct nlmsghdr)) + NETLINK_ALIGN(sizeof(struct rtgenmsg)); - int curr_length = offset; void *tail = (void *)((char *)nlh + NETLINK_ALIGN(nlh->nlmsg_len)); struct nlattr *attr; @@ -145,7 +144,6 @@ static ns_id_t extract_nsid(struct nlmsghdr *nlh, char *buf) && attr->nla_len >= sizeof(struct nlattr) && attr->nla_len <= NETLINK_NLATTR_LEN(tail, attr); attr += NETLINK_ALIGN(attr->nla_len)) { - curr_length += attr->nla_len; if ((attr->nla_type & NLA_TYPE_MASK) == NETNSA_NSID) { uint32_t *ptr = (uint32_t *)(attr);