From d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 8 Sep 2019 12:33:09 +0000 Subject: uncrustify as demanded. --- src/rps/rps-sampler_common.h | 76 +++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 39 deletions(-) (limited to 'src/rps/rps-sampler_common.h') diff --git a/src/rps/rps-sampler_common.h b/src/rps/rps-sampler_common.h index 321efaf1e..4a45c0193 100644 --- a/src/rps/rps-sampler_common.h +++ b/src/rps/rps-sampler_common.h @@ -16,7 +16,7 @@ along with this program. If not, see . SPDX-License-Identifier: AGPL3.0-or-later -*/ + */ /** * @file rps/rps-sampler_common.h @@ -69,7 +69,7 @@ typedef void * @param ids the PeerIDs that were returned * to be freed */ - typedef void +typedef void (*RPS_sampler_n_rand_peers_ready_cb) (const struct GNUNET_PeerIdentity *ids, uint32_t num_peers, void *cls); @@ -84,7 +84,7 @@ typedef void * @param ids the PeerIDs that were returned * to be freed */ - typedef void +typedef void (*RPS_sampler_sinlge_info_ready_cb) (const struct GNUNET_PeerIdentity *ids, void *cls, double probability, @@ -103,8 +103,7 @@ typedef void /** * Closure for #sampler_mod_get_rand_peer() and #sampler_get_rand_peer */ -struct GetPeerCls -{ +struct GetPeerCls { /** * DLL */ @@ -151,8 +150,7 @@ struct GetPeerCls /** * Sampler with its own array of SamplerElements */ -struct RPS_Sampler -{ +struct RPS_Sampler { /** * Number of sampler elements we hold. */ @@ -222,8 +220,8 @@ struct RPS_Sampler * @param num_peers The estimated value */ void -RPS_sampler_update_with_nw_size (struct RPS_Sampler *sampler, - uint32_t num_peers); +RPS_sampler_update_with_nw_size(struct RPS_Sampler *sampler, + uint32_t num_peers); /** @@ -237,8 +235,8 @@ RPS_sampler_update_with_nw_size (struct RPS_Sampler *sampler, * @param desired_probability */ void -RPS_sampler_set_desired_probability (struct RPS_Sampler *sampler, - double desired_probability); +RPS_sampler_set_desired_probability(struct RPS_Sampler *sampler, + double desired_probability); /** @@ -251,8 +249,8 @@ RPS_sampler_set_desired_probability (struct RPS_Sampler *sampler, * @param desired_probability */ void -RPS_sampler_set_deficiency_factor (struct RPS_Sampler *sampler, - double deficiency_factor); +RPS_sampler_set_deficiency_factor(struct RPS_Sampler *sampler, + double deficiency_factor); /** @@ -266,9 +264,9 @@ RPS_sampler_set_deficiency_factor (struct RPS_Sampler *sampler, * @return The context containing callback and closure */ struct SamplerNotifyUpdateCTX * -sampler_notify_on_update (struct RPS_Sampler *sampler, - SamplerNotifyUpdateCB notify_cb, - void *cls); +sampler_notify_on_update(struct RPS_Sampler *sampler, + SamplerNotifyUpdateCB notify_cb, + void *cls); /** @@ -277,9 +275,9 @@ sampler_notify_on_update (struct RPS_Sampler *sampler, * @param sampler the sampler to update. * @param id the PeerID that is put in the sampler */ - void -RPS_sampler_update (struct RPS_Sampler *sampler, - const struct GNUNET_PeerIdentity *id); +void +RPS_sampler_update(struct RPS_Sampler *sampler, + const struct GNUNET_PeerIdentity *id); /** @@ -290,9 +288,9 @@ RPS_sampler_update (struct RPS_Sampler *sampler, * @param sampler the sampler to reinitialise a sampler element in. * @param id the id of the sampler elements to update. */ - void -RPS_sampler_reinitialise_by_value (struct RPS_Sampler *sampler, - const struct GNUNET_PeerIdentity *id); +void +RPS_sampler_reinitialise_by_value(struct RPS_Sampler *sampler, + const struct GNUNET_PeerIdentity *id); /** @@ -302,7 +300,7 @@ RPS_sampler_reinitialise_by_value (struct RPS_Sampler *sampler, * @return the size of the sampler */ unsigned int -RPS_sampler_get_size (struct RPS_Sampler *sampler); +RPS_sampler_get_size(struct RPS_Sampler *sampler); /** @@ -312,7 +310,7 @@ RPS_sampler_get_size (struct RPS_Sampler *sampler); * @param new_size the new size of the sampler */ void -RPS_sampler_resize (struct RPS_Sampler *sampler, unsigned int new_size); +RPS_sampler_resize(struct RPS_Sampler *sampler, unsigned int new_size); /** @@ -330,10 +328,10 @@ RPS_sampler_resize (struct RPS_Sampler *sampler, unsigned int new_size); * @param num_peers the number of peers requested */ struct RPS_SamplerRequestHandle * -RPS_sampler_get_n_rand_peers (struct RPS_Sampler *sampler, - uint32_t num_peers, - RPS_sampler_n_rand_peers_ready_cb cb, - void *cls); +RPS_sampler_get_n_rand_peers(struct RPS_Sampler *sampler, + uint32_t num_peers, + RPS_sampler_n_rand_peers_ready_cb cb, + void *cls); /** @@ -344,9 +342,9 @@ RPS_sampler_get_n_rand_peers (struct RPS_Sampler *sampler, * @param cls closure given to @a cb */ struct RPS_SamplerRequestHandleSingleInfo * -RPS_sampler_get_rand_peer_info (struct RPS_Sampler *sampler, - RPS_sampler_sinlge_info_ready_cb cb, - void *cls); +RPS_sampler_get_rand_peer_info(struct RPS_Sampler *sampler, + RPS_sampler_sinlge_info_ready_cb cb, + void *cls); /** @@ -357,9 +355,9 @@ RPS_sampler_get_rand_peer_info (struct RPS_Sampler *sampler, * * @return the number of occurrences of id. */ - uint32_t -RPS_sampler_count_id (struct RPS_Sampler *sampler, - const struct GNUNET_PeerIdentity *id); +uint32_t +RPS_sampler_count_id(struct RPS_Sampler *sampler, + const struct GNUNET_PeerIdentity *id); /** @@ -368,7 +366,7 @@ RPS_sampler_count_id (struct RPS_Sampler *sampler, * @param req_handle the handle to the request */ void -RPS_sampler_request_cancel (struct RPS_SamplerRequestHandle *req_handle); +RPS_sampler_request_cancel(struct RPS_SamplerRequestHandle *req_handle); /** @@ -377,15 +375,15 @@ RPS_sampler_request_cancel (struct RPS_SamplerRequestHandle *req_handle); * @param req_handle the handle to the request */ void -RPS_sampler_request_single_info_cancel ( - struct RPS_SamplerRequestHandleSingleInfo *req_single_info_handle); +RPS_sampler_request_single_info_cancel( + struct RPS_SamplerRequestHandleSingleInfo *req_single_info_handle); /** * Cleans the sampler. */ - void -RPS_sampler_destroy (struct RPS_Sampler *sampler); +void +RPS_sampler_destroy(struct RPS_Sampler *sampler); #endif /* RPS_SAMPLER_COMMON_H */ /* end of rps-sampler_common.h */ -- cgit v1.2.3