aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Barksdale <amatus.amongus@gmail.com>2016-10-26 18:55:25 +0000
committerDavid Barksdale <amatus.amongus@gmail.com>2016-10-26 18:55:25 +0000
commit61f388ab07724920dd03c0dd06165b4d068edc18 (patch)
treea07248029b5307c0ed2f518b9a398c04a84476d2 /src
parent466456330475aeb89e863f695a7e1ef0c312901d (diff)
downloadgnunet-61f388ab07724920dd03c0dd06165b4d068edc18.tar.gz
gnunet-61f388ab07724920dd03c0dd06165b4d068edc18.zip
Move type check after initialization to make compiler happy
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_mq_lib.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h
index bcf923fcc..d1a045b8b 100644
--- a/src/include/gnunet_mq_lib.h
+++ b/src/include/gnunet_mq_lib.h
@@ -93,7 +93,14 @@
93 * @param mh message to nest 93 * @param mh message to nest
94 * @return a newly allocated 'struct GNUNET_MQ_Envelope *' 94 * @return a newly allocated 'struct GNUNET_MQ_Envelope *'
95 */ 95 */
96#define GNUNET_MQ_msg_nested_mh(mvar, type, mh) GNUNET_MQ_msg_nested_mh_((((void)(mvar)->header), (struct GNUNET_MessageHeader**) &(mvar)), sizeof (*(mvar)), (type), mh) 96#define GNUNET_MQ_msg_nested_mh(mvar, type, mh) \
97 ({struct GNUNET_MQ_Envelope *_ev;\
98 _ev = GNUNET_MQ_msg_nested_mh_((struct GNUNET_MessageHeader**) &(mvar),\
99 sizeof (*(mvar)),\
100 (type),\
101 (mh));\
102 (void)(mvar)->header; /* type check */\
103 _ev;})
97 104
98 105
99/** 106/**