summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-07-27 11:36:55 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-08-02 02:55:42 +0200
commit1cc2cb9f1b0bfc0f9a15055fae9d8350cc2054d9 (patch)
treee45863e743a41dd24676b9a06473571ced97cc53
parentc: specify static array size in function params (diff)
downloadwireguard-monolithic-historical-1cc2cb9f1b0bfc0f9a15055fae9d8350cc2054d9.tar.xz
wireguard-monolithic-historical-1cc2cb9f1b0bfc0f9a15055fae9d8350cc2054d9.zip
uapi: typeof is not necessary
-rw-r--r--src/uapi.h8
1 files changed, 4 insertions, 4 deletions
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