summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/filter.c2
-rw-r--r--lib/plist.c2
-rw-r--r--lib/skiplist.c4
-rw-r--r--lib/sockopt.c3
4 files changed, 5 insertions, 6 deletions
diff --git a/lib/filter.c b/lib/filter.c
index 80f8cf0bd..3226fb2f5 100644
--- a/lib/filter.c
+++ b/lib/filter.c
@@ -412,7 +412,7 @@ static int64_t filter_new_seq_get(struct access_list *access)
int64_t newseq;
struct filter *filter;
- maxseq = newseq = 0;
+ maxseq = 0;
for (filter = access->head; filter; filter = filter->next) {
if (maxseq < filter->seq)
diff --git a/lib/plist.c b/lib/plist.c
index 2a3a087cf..e465963f2 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -387,7 +387,7 @@ static int64_t prefix_new_seq_get(struct prefix_list *plist)
int64_t newseq;
struct prefix_list_entry *pentry;
- maxseq = newseq = 0;
+ maxseq = 0;
for (pentry = plist->head; pentry; pentry = pentry->next) {
if (maxseq < pentry->seq)
diff --git a/lib/skiplist.c b/lib/skiplist.c
index 6efa2c362..67cc1ab37 100644
--- a/lib/skiplist.c
+++ b/lib/skiplist.c
@@ -378,7 +378,7 @@ int skiplist_next_value(register struct skiplist *l, /* in */
void **valuePointer, /* in/out */
void **cursor) /* in/out */
{
- register int k, m;
+ register int k;
register struct skiplistnode *p, *q;
CHECKLAST(l);
@@ -389,7 +389,7 @@ int skiplist_next_value(register struct skiplist *l, /* in */
if (!cursor || !*cursor) {
p = l->header;
- k = m = l->level;
+ k = l->level;
/*
* Find matching key
diff --git a/lib/sockopt.c b/lib/sockopt.c
index d6c88c0af..52b1f0356 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -90,12 +90,11 @@ int getsockopt_so_recvbuf(const int sock)
static void *getsockopt_cmsg_data(struct msghdr *msgh, int level, int type)
{
struct cmsghdr *cmsg;
- void *ptr = NULL;
for (cmsg = CMSG_FIRSTHDR(msgh); cmsg != NULL;
cmsg = CMSG_NXTHDR(msgh, cmsg))
if (cmsg->cmsg_level == level && cmsg->cmsg_type == type)
- return (ptr = CMSG_DATA(cmsg));
+ return CMSG_DATA(cmsg);
return NULL;
}