summaryrefslogtreecommitdiff
path: root/nhrpd/zbuf.h
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2020-04-08 08:57:15 +0300
committerDonatas Abraitis <donatas.abraitis@gmail.com>2020-04-08 17:15:06 +0300
commitc4efd0f4235d1151a95add06ad5ccb42c7dcff21 (patch)
tree9aaff71f3b3ae6c23457092f6c78a25deec6adb7 /nhrpd/zbuf.h
parentc446af503e10e6b976500af81aa159512430d0d6 (diff)
*: Do not cast to the same type
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'nhrpd/zbuf.h')
-rw-r--r--nhrpd/zbuf.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/nhrpd/zbuf.h b/nhrpd/zbuf.h
index d03f4ca3a2..e6f7101d63 100644
--- a/nhrpd/zbuf.h
+++ b/nhrpd/zbuf.h
@@ -86,9 +86,9 @@ static inline void *__zbuf_pull(struct zbuf *zb, size_t size, int error)
}
#define zbuf_pull(zb, type) ((type *)__zbuf_pull(zb, sizeof(type), 1))
-#define zbuf_pulln(zb, sz) ((void *)__zbuf_pull(zb, sz, 1))
+#define zbuf_pulln(zb, sz) (__zbuf_pull(zb, sz, 1))
#define zbuf_may_pull(zb, type) ((type *)__zbuf_pull(zb, sizeof(type), 0))
-#define zbuf_may_pulln(zb, sz) ((void *)__zbuf_pull(zb, sz, 0))
+#define zbuf_may_pulln(zb, sz) (__zbuf_pull(zb, sz, 0))
void *zbuf_may_pull_until(struct zbuf *zb, const char *sep, struct zbuf *msg);
@@ -149,9 +149,9 @@ static inline void *__zbuf_push(struct zbuf *zb, size_t size, int error)
}
#define zbuf_push(zb, type) ((type *)__zbuf_push(zb, sizeof(type), 1))
-#define zbuf_pushn(zb, sz) ((void *)__zbuf_push(zb, sz, 1))
+#define zbuf_pushn(zb, sz) (__zbuf_push(zb, sz, 1))
#define zbuf_may_push(zb, type) ((type *)__zbuf_may_push(zb, sizeof(type), 0))
-#define zbuf_may_pushn(zb, sz) ((void *)__zbuf_push(zb, sz, 0))
+#define zbuf_may_pushn(zb, sz) (__zbuf_push(zb, sz, 0))
static inline void zbuf_put(struct zbuf *zb, const void *src, size_t len)
{