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/revocation | |
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/revocation')
-rw-r--r-- | src/revocation/gnunet-service-revocation.c | 8 | ||||
-rw-r--r-- | src/revocation/revocation_api.c | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c index 0f67977a1..706432ece 100644 --- a/src/revocation/gnunet-service-revocation.c +++ b/src/revocation/gnunet-service-revocation.c | |||
@@ -777,9 +777,6 @@ run (void *cls, | |||
777 | struct GNUNET_SERVER_Handle *server, | 777 | struct GNUNET_SERVER_Handle *server, |
778 | const struct GNUNET_CONFIGURATION_Handle *c) | 778 | const struct GNUNET_CONFIGURATION_Handle *c) |
779 | { | 779 | { |
780 | GNUNET_MQ_hd_fixed_size (p2p_revoke, | ||
781 | GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE, | ||
782 | struct RevokeMessage); | ||
783 | static const struct GNUNET_SERVER_MessageHandler handlers[] = { | 780 | static const struct GNUNET_SERVER_MessageHandler handlers[] = { |
784 | {&handle_query_message, NULL, GNUNET_MESSAGE_TYPE_REVOCATION_QUERY, | 781 | {&handle_query_message, NULL, GNUNET_MESSAGE_TYPE_REVOCATION_QUERY, |
785 | sizeof (struct QueryMessage)}, | 782 | sizeof (struct QueryMessage)}, |
@@ -788,7 +785,10 @@ run (void *cls, | |||
788 | {NULL, NULL, 0, 0} | 785 | {NULL, NULL, 0, 0} |
789 | }; | 786 | }; |
790 | struct GNUNET_MQ_MessageHandler core_handlers[] = { | 787 | struct GNUNET_MQ_MessageHandler core_handlers[] = { |
791 | make_p2p_revoke_handler (NULL), | 788 | GNUNET_MQ_hd_fixed_size (p2p_revoke, |
789 | GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE, | ||
790 | struct RevokeMessage, | ||
791 | NULL), | ||
792 | GNUNET_MQ_handler_end () | 792 | GNUNET_MQ_handler_end () |
793 | }; | 793 | }; |
794 | char *fn; | 794 | char *fn; |
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c index 0b9bc4ea6..8c00ac2ae 100644 --- a/src/revocation/revocation_api.c +++ b/src/revocation/revocation_api.c | |||
@@ -113,13 +113,13 @@ GNUNET_REVOCATION_query (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
113 | GNUNET_REVOCATION_Callback func, | 113 | GNUNET_REVOCATION_Callback func, |
114 | void *func_cls) | 114 | void *func_cls) |
115 | { | 115 | { |
116 | GNUNET_MQ_hd_fixed_size (revocation_query_response, | ||
117 | GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE, | ||
118 | struct QueryResponseMessage); | ||
119 | struct GNUNET_REVOCATION_Query *q | 116 | struct GNUNET_REVOCATION_Query *q |
120 | = GNUNET_new (struct GNUNET_REVOCATION_Query); | 117 | = GNUNET_new (struct GNUNET_REVOCATION_Query); |
121 | struct GNUNET_MQ_MessageHandler handlers[] = { | 118 | struct GNUNET_MQ_MessageHandler handlers[] = { |
122 | make_revocation_query_response_handler (q), | 119 | GNUNET_MQ_hd_fixed_size (revocation_query_response, |
120 | GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE, | ||
121 | struct QueryResponseMessage, | ||
122 | q), | ||
123 | GNUNET_MQ_handler_end () | 123 | GNUNET_MQ_handler_end () |
124 | }; | 124 | }; |
125 | struct QueryMessage *qm; | 125 | struct QueryMessage *qm; |
@@ -255,13 +255,13 @@ GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
255 | GNUNET_REVOCATION_Callback func, | 255 | GNUNET_REVOCATION_Callback func, |
256 | void *func_cls) | 256 | void *func_cls) |
257 | { | 257 | { |
258 | GNUNET_MQ_hd_fixed_size (revocation_response, | ||
259 | GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE, | ||
260 | struct RevocationResponseMessage); | ||
261 | struct GNUNET_REVOCATION_Handle *h | 258 | struct GNUNET_REVOCATION_Handle *h |
262 | = GNUNET_new (struct GNUNET_REVOCATION_Handle); | 259 | = GNUNET_new (struct GNUNET_REVOCATION_Handle); |
263 | struct GNUNET_MQ_MessageHandler handlers[] = { | 260 | struct GNUNET_MQ_MessageHandler handlers[] = { |
264 | make_revocation_response_handler (h), | 261 | GNUNET_MQ_hd_fixed_size (revocation_response, |
262 | GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE, | ||
263 | struct RevocationResponseMessage, | ||
264 | h), | ||
265 | GNUNET_MQ_handler_end () | 265 | GNUNET_MQ_handler_end () |
266 | }; | 266 | }; |
267 | unsigned long long matching_bits; | 267 | unsigned long long matching_bits; |