diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-07-27 11:36:55 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-08-02 02:55:42 +0200 |
commit | 650a68f64686aa7800a33ad1591d29032a34c7ad (patch) | |
tree | d581d62bc146b407b14dde6085c51032e6b0f4fb /src/uapi.h | |
parent | 598f4c8542b3152f7cfb873532724e5db1eb1092 (diff) |
uapi: typeof is not necessary
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/uapi.h')
-rw-r--r-- | src/uapi.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |