diff options
author | David Barksdale <amatus.amongus@gmail.com> | 2016-08-18 00:03:29 +0000 |
---|---|---|
committer | David Barksdale <amatus.amongus@gmail.com> | 2016-08-18 00:03:29 +0000 |
commit | 7f937e3781f36538d9864fa841822eecdaf0bf27 (patch) | |
tree | 318eb592dae2bbf59d094f5df140c24a4b6184c9 /src/peerinfo | |
parent | 94a717fab18ed25e6bec4b349526212045f6ca70 (diff) | |
download | gnunet-7f937e3781f36538d9864fa841822eecdaf0bf27.tar.gz gnunet-7f937e3781f36538d9864fa841822eecdaf0bf27.zip |
Use statement exprs instead of local function
This change lets us compile with clang again.
Diffstat (limited to 'src/peerinfo')
-rw-r--r-- | src/peerinfo/peerinfo_api.c | 16 | ||||
-rw-r--r-- | src/peerinfo/peerinfo_api_notify.c | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c index e477186ee..3080fb503 100644 --- a/src/peerinfo/peerinfo_api.c +++ b/src/peerinfo/peerinfo_api.c | |||
@@ -440,15 +440,15 @@ handle_end_iteration (void *cls, | |||
440 | static void | 440 | static void |
441 | reconnect (struct GNUNET_PEERINFO_Handle *h) | 441 | reconnect (struct GNUNET_PEERINFO_Handle *h) |
442 | { | 442 | { |
443 | GNUNET_MQ_hd_var_size (info, | ||
444 | GNUNET_MESSAGE_TYPE_PEERINFO_INFO, | ||
445 | struct InfoMessage); | ||
446 | GNUNET_MQ_hd_fixed_size (end_iteration, | ||
447 | GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END, | ||
448 | struct GNUNET_MessageHeader); | ||
449 | struct GNUNET_MQ_MessageHandler handlers[] = { | 443 | struct GNUNET_MQ_MessageHandler handlers[] = { |
450 | make_info_handler (h), | 444 | GNUNET_MQ_hd_var_size (info, |
451 | make_end_iteration_handler (h), | 445 | GNUNET_MESSAGE_TYPE_PEERINFO_INFO, |
446 | struct InfoMessage, | ||
447 | h), | ||
448 | GNUNET_MQ_hd_fixed_size (end_iteration, | ||
449 | GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END, | ||
450 | struct GNUNET_MessageHeader, | ||
451 | h), | ||
452 | GNUNET_MQ_handler_end () | 452 | GNUNET_MQ_handler_end () |
453 | }; | 453 | }; |
454 | 454 | ||
diff --git a/src/peerinfo/peerinfo_api_notify.c b/src/peerinfo/peerinfo_api_notify.c index c3dac5064..625cfb8f6 100644 --- a/src/peerinfo/peerinfo_api_notify.c +++ b/src/peerinfo/peerinfo_api_notify.c | |||
@@ -179,12 +179,12 @@ handle_notification (void *cls, | |||
179 | static void | 179 | static void |
180 | reconnect (void *cls) | 180 | reconnect (void *cls) |
181 | { | 181 | { |
182 | GNUNET_MQ_hd_var_size (notification, | ||
183 | GNUNET_MESSAGE_TYPE_PEERINFO_INFO, | ||
184 | struct InfoMessage); | ||
185 | struct GNUNET_PEERINFO_NotifyContext *nc = cls; | 182 | struct GNUNET_PEERINFO_NotifyContext *nc = cls; |
186 | struct GNUNET_MQ_MessageHandler handlers[] = { | 183 | struct GNUNET_MQ_MessageHandler handlers[] = { |
187 | make_notification_handler (nc), | 184 | GNUNET_MQ_hd_var_size (notification, |
185 | GNUNET_MESSAGE_TYPE_PEERINFO_INFO, | ||
186 | struct InfoMessage, | ||
187 | nc), | ||
188 | GNUNET_MQ_handler_end () | 188 | GNUNET_MQ_handler_end () |
189 | }; | 189 | }; |
190 | struct GNUNET_MQ_Envelope *env; | 190 | struct GNUNET_MQ_Envelope *env; |