diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
commit | 61c39c60565b386e0e12ea669556b030e8cd7180 (patch) | |
tree | 59109aeab8297bdc996faca8c4e38ec7426c36cf /src/consensus | |
parent | 780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff) |
-remove trailing whitespace
Diffstat (limited to 'src/consensus')
-rw-r--r-- | src/consensus/consensus_api.c | 10 | ||||
-rw-r--r-- | src/consensus/gnunet-consensus-profiler.c | 2 | ||||
-rw-r--r-- | src/consensus/gnunet-service-consensus.c | 22 | ||||
-rw-r--r-- | src/consensus/test_consensus_api.c | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/src/consensus/consensus_api.c b/src/consensus/consensus_api.c index b2b3694d65..d8e65c52fd 100644 --- a/src/consensus/consensus_api.c +++ b/src/consensus/consensus_api.c @@ -20,7 +20,7 @@ /** * @file consensus/consensus_api.c - * @brief + * @brief * @author Florian Dold */ #include "platform.h" @@ -103,7 +103,7 @@ struct InsertDoneInfo /** * Called when the server has sent is a new element - * + * * @param cls consensus handle * @param mh element message */ @@ -129,7 +129,7 @@ handle_new_element (void *cls, /** * Called when the server has announced * that the conclusion is over. - * + * * @param cls consensus handle * @param msg conclude done message */ @@ -220,7 +220,7 @@ idc_adapter (void *cls) * * @param consensus handle for the consensus session * @param element the element to be inserted - * @param idc function called when we are done with this element and it + * @param idc function called when we are done with this element and it * is thus allowed to call GNUNET_CONSENSUS_insert again * @param idc_cls closure for 'idc' */ @@ -240,7 +240,7 @@ GNUNET_CONSENSUS_insert (struct GNUNET_CONSENSUS_Handle *consensus, GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_INSERT); memcpy (&element_msg[1], element->data, element->size); - + if (NULL != idc) { i = GNUNET_new (struct InsertDoneInfo); diff --git a/src/consensus/gnunet-consensus-profiler.c b/src/consensus/gnunet-consensus-profiler.c index 00e0172467..bade332b59 100644 --- a/src/consensus/gnunet-consensus-profiler.c +++ b/src/consensus/gnunet-consensus-profiler.c @@ -206,7 +206,7 @@ new_element_cb (void *cls, int idx = chp - consensus_handles; GNUNET_assert (NULL != cls); - + results_for_peer[idx]++; GNUNET_assert (sizeof (struct GNUNET_HashCode) == element->size); diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c index 74f7580348..914943f114 100644 --- a/src/consensus/gnunet-service-consensus.c +++ b/src/consensus/gnunet-service-consensus.c @@ -147,7 +147,7 @@ struct ConsensusSession * Only valid once the current round is not CONSENSUS_ROUND_BEGIN. */ struct GNUNET_TIME_Relative conclude_timeout; - + /** * Timeout task identifier for the current round. */ @@ -286,7 +286,7 @@ have_exp_subround_finished (const struct ConsensusSession *session) { int not_finished; not_finished = 0; - if ( (NULL != session->partner_outgoing) && + if ( (NULL != session->partner_outgoing) && (GNUNET_NO == session->partner_outgoing->exp_subround_finished) ) not_finished++; if ( (NULL != session->partner_incoming) && @@ -300,7 +300,7 @@ have_exp_subround_finished (const struct ConsensusSession *session) /** * Destroy a session, free all resources associated with it. - * + * * @param session the session to destroy */ static void @@ -404,7 +404,7 @@ send_to_client_iter (void *cls, * @param tc task context, for when this task is invoked by the scheduler, * NULL if invoked for another reason */ -static void +static void round_over (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct ConsensusSession *session; @@ -459,7 +459,7 @@ shuffle (struct ConsensusSession *session) if (NULL == session->shuffle_inv) session->shuffle_inv = GNUNET_malloc (session->num_peers * sizeof (*session->shuffle_inv)); - GNUNET_CRYPTO_kdf (randomness, sizeof (randomness), + GNUNET_CRYPTO_kdf (randomness, sizeof (randomness), &session->exp_round, sizeof (uint32_t), &session->global_id, sizeof (struct GNUNET_HashCode), NULL); @@ -559,7 +559,7 @@ find_partners (struct ConsensusSession *session) * @param element a result element, only valid if status is GNUNET_SET_STATUS_OK * @param status see enum GNUNET_SET_Status */ -static void +static void set_result_cb (void *cls, const struct GNUNET_SET_Element *element, enum GNUNET_SET_Status status) @@ -674,7 +674,7 @@ subround_over (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_SCHEDULER_cancel (session->round_timeout_tid); session->round_timeout_tid = GNUNET_SCHEDULER_NO_TASK; } - + if (session->exp_round >= NUM_EXP_ROUNDS) { round_over (session, NULL); @@ -700,7 +700,7 @@ subround_over (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) session->exp_subround = 0; shuffle (session); } - else + else { session->exp_subround++; } @@ -810,7 +810,7 @@ get_peer_idx (const struct GNUNET_PeerIdentity *peer, const struct ConsensusSess * @param session_id local id of the consensus session */ static void -compute_global_id (struct ConsensusSession *session, +compute_global_id (struct ConsensusSession *session, const struct GNUNET_HashCode *session_id) { int i; @@ -865,7 +865,7 @@ initialize_session_peer_list (struct ConsensusSession *session, /* peers in the join message, may or may not include the local peer */ listed_peers = ntohl (join_msg->num_peers); - + session->num_peers = listed_peers; msg_peers = (struct GNUNET_PeerIdentity *) &join_msg[1]; @@ -1025,7 +1025,7 @@ initialize_session (struct ConsensusSession *session, other_session = sessions_head; while (NULL != other_session) { - if ((other_session != session) && + if ((other_session != session) && (0 == GNUNET_CRYPTO_hash_cmp (&session->global_id, &other_session->global_id))) { if (CONSENSUS_ROUND_FINISH != other_session->current_round) diff --git a/src/consensus/test_consensus_api.c b/src/consensus/test_consensus_api.c index 37a5eb692e..9b6f71f7aa 100644 --- a/src/consensus/test_consensus_api.c +++ b/src/consensus/test_consensus_api.c @@ -82,7 +82,7 @@ on_shutdown (void *cls, static void -run (void *cls, +run (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_TESTING_Peer *peer) { |