]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: remove unused variable
authorDavid Lamparter <equinox@opensourcerouting.org>
Mon, 7 Mar 2022 16:36:00 +0000 (17:36 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Mon, 7 Mar 2022 16:37:27 +0000 (17:37 +0100)
clang complains "variable 'curr_length' set but not used".

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
zebra/zebra_netns_id.c

index 81d610940dd5b857f714c20a8c1bedfa97e1196e..739ba330364e161a2713c7073041478e049a2aad 100644 (file)
@@ -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);