summaryrefslogtreecommitdiff
path: root/src/scalarproduct/scalarproduct_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scalarproduct/scalarproduct_api.c')
-rw-r--r--src/scalarproduct/scalarproduct_api.c50
1 files changed, 20 insertions, 30 deletions
diff --git a/src/scalarproduct/scalarproduct_api.c b/src/scalarproduct/scalarproduct_api.c
index b2a90c222..4ac39614a 100644
--- a/src/scalarproduct/scalarproduct_api.c
+++ b/src/scalarproduct/scalarproduct_api.c
@@ -42,14 +42,10 @@
* @param status processing status code
*/
typedef void
-(*GNUNET_SCALARPRODUCT_ResponseMessageHandler) (struct
- GNUNET_SCALARPRODUCT_ComputationHandle
- *h,
- const struct
- ClientResponseMessage *msg,
- enum
- GNUNET_SCALARPRODUCT_ResponseStatus
- status);
+(*GNUNET_SCALARPRODUCT_ResponseMessageHandler) (
+ struct GNUNET_SCALARPRODUCT_ComputationHandle *h,
+ const struct ClientResponseMessage *msg,
+ enum GNUNET_SCALARPRODUCT_ResponseStatus status);
/**
@@ -172,13 +168,12 @@ check_unique (const struct GNUNET_SCALARPRODUCT_Element *elements,
uint32_t element_count)
{
struct GNUNET_CONTAINER_MultiHashMap *map;
- uint32_t i;
int ok;
ok = GNUNET_OK;
map = GNUNET_CONTAINER_multihashmap_create (2 * element_count,
GNUNET_YES);
- for (i = 0; i < element_count; i++)
+ for (uint32_t i = 0; i < element_count; i++)
if (GNUNET_OK !=
GNUNET_CONTAINER_multihashmap_put (map,
&elements[i].key,
@@ -227,16 +222,13 @@ mq_error_handler (void *cls,
* @return a new handle for this computation
*/
struct GNUNET_SCALARPRODUCT_ComputationHandle *
-GNUNET_SCALARPRODUCT_accept_computation (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const struct
- GNUNET_HashCode *session_key,
- const struct
- GNUNET_SCALARPRODUCT_Element *elements,
- uint32_t element_count,
- GNUNET_SCALARPRODUCT_ContinuationWithStatus
- cont,
- void *cont_cls)
+GNUNET_SCALARPRODUCT_accept_computation (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const struct GNUNET_HashCode *session_key,
+ const struct GNUNET_SCALARPRODUCT_Element *elements,
+ uint32_t element_count,
+ GNUNET_SCALARPRODUCT_ContinuationWithStatus cont,
+ void *cont_cls)
{
struct GNUNET_SCALARPRODUCT_ComputationHandle *h
= GNUNET_new (struct GNUNET_SCALARPRODUCT_ComputationHandle);
@@ -389,16 +381,14 @@ process_result_message (struct GNUNET_SCALARPRODUCT_ComputationHandle *h,
* @return a new handle for this computation
*/
struct GNUNET_SCALARPRODUCT_ComputationHandle *
-GNUNET_SCALARPRODUCT_start_computation (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const struct
- GNUNET_HashCode *session_key,
- const struct GNUNET_PeerIdentity *peer,
- const struct
- GNUNET_SCALARPRODUCT_Element *elements,
- uint32_t element_count,
- GNUNET_SCALARPRODUCT_DatumProcessor cont,
- void *cont_cls)
+GNUNET_SCALARPRODUCT_start_computation (
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const struct GNUNET_HashCode *session_key,
+ const struct GNUNET_PeerIdentity *peer,
+ const struct GNUNET_SCALARPRODUCT_Element *elements,
+ uint32_t element_count,
+ GNUNET_SCALARPRODUCT_DatumProcessor cont,
+ void *cont_cls)
{
struct GNUNET_SCALARPRODUCT_ComputationHandle *h
= GNUNET_new (struct GNUNET_SCALARPRODUCT_ComputationHandle);