Fix unused variable warning in ipsec_mbuf.c

With clang 15, the following -Werror warning is produced:

    sys/netipsec/ipsec_mbuf.c:93:24: error: variable 'alloc' set but not used [-Werror,-Wunused-but-set-variable]
                    int todo, len, done, alloc;
                                         ^

The 'alloc' variable appears to have been a debugging aid that has never
been used for anything, so remove it.

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2022-07-21 22:03:50 +02:00
parent a848315f68
commit df5d2841d5

View file

@ -90,11 +90,10 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
*off = skip;
} else if (hlen > M_TRAILINGSPACE(m)) {
struct mbuf *n0, *n, **np;
int todo, len, done, alloc;
int todo, len, done;
n0 = NULL;
np = &n0;
alloc = 0;
done = 0;
todo = remain;
while (todo > 0) {
@ -112,7 +111,6 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
}
*np = n;
np = &n->m_next;
alloc++;
len = min(todo, len);
memcpy(n->m_data, mtod(m, char *) + skip + done, len);
n->m_len = len;
@ -134,7 +132,6 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
m_freem(n0);
return NULL;
}
alloc++;
if ((n->m_next = n0) == NULL)
np = &n->m_next;