summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/command_match.c2
-rw-r--r--lib/md5.c4
-rw-r--r--lib/skiplist.c4
-rw-r--r--lib/table.c2
-rw-r--r--lib/vrf.c2
-rw-r--r--lib/zclient.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index 0195aebc1..801b05f15 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -88,7 +88,7 @@ enum matcher_rv command_match(struct graph *cmdgraph, vector vline,
// prepend a dummy token to match that pesky start node
vector vvline = vector_init(vline->alloced + 1);
- vector_set_index(vvline, 0, (void *)XSTRDUP(MTYPE_TMP, "dummy"));
+ vector_set_index(vvline, 0, XSTRDUP(MTYPE_TMP, "dummy"));
memcpy(vvline->index + 1, vline->index,
sizeof(void *) * vline->alloced);
vvline->active = vline->active + 1;
diff --git a/lib/md5.c b/lib/md5.c
index 9c003a3af..5c93c7bc1 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -429,7 +429,7 @@ void hmac_md5(unsigned char *text, int text_len, unsigned char *key,
* pass */
MD5Update(&context, k_ipad, 64); /* start with inner pad */
MD5Update(&context, text, text_len); /* then text of datagram */
- MD5Final((uint8_t *)digest, &context); /* finish up 1st pass */
+ MD5Final(digest, &context); /* finish up 1st pass */
/*
* perform outer MD5
*/
@@ -438,5 +438,5 @@ void hmac_md5(unsigned char *text, int text_len, unsigned char *key,
MD5Update(&context, k_opad, 64); /* start with outer pad */
MD5Update(&context, digest, 16); /* then results of 1st
* hash */
- MD5Final((uint8_t *)digest, &context); /* finish up 2nd pass */
+ MD5Final(digest, &context); /* finish up 2nd pass */
}
diff --git a/lib/skiplist.c b/lib/skiplist.c
index fa25770ef..790bd71c3 100644
--- a/lib/skiplist.c
+++ b/lib/skiplist.c
@@ -624,7 +624,7 @@ void skiplist_test(struct vty *vty)
zlog_debug("%s: (%d:%d)", __func__, i, k);
}
// keys[k] = (void *)random();
- keys[k] = (void *)scramble(k);
+ keys[k] = scramble(k);
if (skiplist_insert(l, keys[k], keys[k]))
zlog_debug("error in insert #%d,#%d", i, k);
}
@@ -649,7 +649,7 @@ void skiplist_test(struct vty *vty)
zlog_debug("<%d:%d>", i, k);
if (skiplist_delete(l, keys[k], keys[k]))
zlog_debug("error in delete");
- keys[k] = (void *)scramble(k ^ 0xf0f0f0f0);
+ keys[k] = scramble(k ^ 0xf0f0f0f0);
if (skiplist_insert(l, keys[k], keys[k]))
zlog_debug("error in insert #%d,#%d", i, k);
}
diff --git a/lib/table.c b/lib/table.c
index 1a89a95f4..86347cbac 100644
--- a/lib/table.c
+++ b/lib/table.c
@@ -160,7 +160,7 @@ static void route_common(const struct prefix *n, const struct prefix *p,
np = (const uint8_t *)&n->u.prefix;
pp = (const uint8_t *)&p->u.prefix;
- newp = (uint8_t *)&new->u.prefix;
+ newp = &new->u.prefix;
for (i = 0; i < p->prefixlen / 8; i++) {
if (np[i] == pp[i])
diff --git a/lib/vrf.c b/lib/vrf.c
index 370a1b235..31ea2d6c4 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -116,7 +116,7 @@ static void vrf_update_vrf_id(ns_id_t ns_id, void *opaqueptr)
vrf->vrf_id = vrf_id;
RB_INSERT(vrf_id_head, &vrfs_by_id, vrf);
if (old_vrf_id == VRF_UNKNOWN)
- vrf_enable((struct vrf *)vrf);
+ vrf_enable(vrf);
}
int vrf_switch_to_netns(vrf_id_t vrf_id)
diff --git a/lib/zclient.c b/lib/zclient.c
index d380267a7..d8c6e002d 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -990,7 +990,7 @@ int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api)
stream_putc(s, api->prefix.family);
psize = PSIZE(api->prefix.prefixlen);
stream_putc(s, api->prefix.prefixlen);
- stream_write(s, (uint8_t *)&api->prefix.u.prefix, psize);
+ stream_write(s, &api->prefix.u.prefix, psize);
if (CHECK_FLAG(api->message, ZAPI_MESSAGE_SRCPFX)) {
psize = PSIZE(api->src_prefix.prefixlen);