lib: 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:
Donald Sharp 2020-02-24 08:29:27 -05:00
parent 1bb379bf4e
commit 5037cc3eb4
4 changed files with 5 additions and 6 deletions

View file

@ -412,7 +412,7 @@ static int64_t filter_new_seq_get(struct access_list *access)
int64_t newseq; int64_t newseq;
struct filter *filter; struct filter *filter;
maxseq = newseq = 0; maxseq = 0;
for (filter = access->head; filter; filter = filter->next) { for (filter = access->head; filter; filter = filter->next) {
if (maxseq < filter->seq) if (maxseq < filter->seq)

View file

@ -387,7 +387,7 @@ static int64_t prefix_new_seq_get(struct prefix_list *plist)
int64_t newseq; int64_t newseq;
struct prefix_list_entry *pentry; struct prefix_list_entry *pentry;
maxseq = newseq = 0; maxseq = 0;
for (pentry = plist->head; pentry; pentry = pentry->next) { for (pentry = plist->head; pentry; pentry = pentry->next) {
if (maxseq < pentry->seq) if (maxseq < pentry->seq)

View file

@ -378,7 +378,7 @@ int skiplist_next_value(register struct skiplist *l, /* in */
void **valuePointer, /* in/out */ void **valuePointer, /* in/out */
void **cursor) /* in/out */ void **cursor) /* in/out */
{ {
register int k, m; register int k;
register struct skiplistnode *p, *q; register struct skiplistnode *p, *q;
CHECKLAST(l); CHECKLAST(l);
@ -389,7 +389,7 @@ int skiplist_next_value(register struct skiplist *l, /* in */
if (!cursor || !*cursor) { if (!cursor || !*cursor) {
p = l->header; p = l->header;
k = m = l->level; k = l->level;
/* /*
* Find matching key * Find matching key

View file

@ -90,12 +90,11 @@ int getsockopt_so_recvbuf(const int sock)
static void *getsockopt_cmsg_data(struct msghdr *msgh, int level, int type) static void *getsockopt_cmsg_data(struct msghdr *msgh, int level, int type)
{ {
struct cmsghdr *cmsg; struct cmsghdr *cmsg;
void *ptr = NULL;
for (cmsg = CMSG_FIRSTHDR(msgh); cmsg != NULL; for (cmsg = CMSG_FIRSTHDR(msgh); cmsg != NULL;
cmsg = CMSG_NXTHDR(msgh, cmsg)) cmsg = CMSG_NXTHDR(msgh, cmsg))
if (cmsg->cmsg_level == level && cmsg->cmsg_type == type) if (cmsg->cmsg_level == level && cmsg->cmsg_type == type)
return (ptr = CMSG_DATA(cmsg)); return CMSG_DATA(cmsg);
return NULL; return NULL;
} }