From 650a68f64686aa7800a33ad1591d29032a34c7ad Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 27 Jul 2016 11:36:55 +0200 Subject: uapi: typeof is not necessary Signed-off-by: Jason A. Donenfeld --- src/uapi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/uapi.h') diff --git a/src/uapi.h b/src/uapi.h index 01dba48..6c6971e 100644 --- a/src/uapi.h +++ b/src/uapi.h @@ -137,12 +137,12 @@ struct wgdevice { * } * } */ -#define for_each_wgpeer(__dev, __peer, __i) for ((__i) = 0, (__peer) = (typeof(__peer))((uint8_t *)(__dev) + sizeof(struct wgdevice)); \ +#define for_each_wgpeer(__dev, __peer, __i) for ((__i) = 0, (__peer) = (struct wgpeer *)((uint8_t *)(__dev) + sizeof(struct wgdevice)); \ (__i) < (__dev)->num_peers; \ - ++(__i), (__peer) = (typeof(__peer))((uint8_t *)(__peer) + sizeof(struct wgpeer) + (sizeof(struct wgipmask) * (__peer)->num_ipmasks))) + ++(__i), (__peer) = (struct wgpeer *)((uint8_t *)(__peer) + sizeof(struct wgpeer) + (sizeof(struct wgipmask) * (__peer)->num_ipmasks))) -#define for_each_wgipmask(__peer, __ipmask, __i) for ((__i) = 0, (__ipmask) = (typeof(__ipmask))((uint8_t *)(__peer) + sizeof(struct wgpeer)); \ +#define for_each_wgipmask(__peer, __ipmask, __i) for ((__i) = 0, (__ipmask) = (struct wgipmask *)((uint8_t *)(__peer) + sizeof(struct wgpeer)); \ (__i) < (__peer)->num_ipmasks; \ - ++(__i), (__ipmask) = (typeof(__ipmask))((uint8_t *)(__ipmask) + sizeof(struct wgipmask))) + ++(__i), (__ipmask) = (struct wgipmask *)((uint8_t *)(__ipmask) + sizeof(struct wgipmask))) #endif -- cgit v1.2.3