diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-31 13:03:48 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-31 13:03:48 +0100 |
commit | 7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch) | |
tree | bdc3874b7894242b095b892f1ed3e81a4d4f06c0 /src/dht | |
parent | 01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff) | |
download | gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.tar.gz gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.zip |
tighten formatting rules
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/dht.h | 1 | ||||
-rw-r--r-- | src/dht/dht_test_lib.c | 1 | ||||
-rw-r--r-- | src/dht/gnunet-dht-get.c | 1 | ||||
-rw-r--r-- | src/dht/gnunet-dht-monitor.c | 2 | ||||
-rw-r--r-- | src/dht/gnunet-dht-put.c | 2 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht.c | 2 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht.h | 1 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_clients.c | 5 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_hello.c | 1 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_neighbours.c | 7 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_neighbours.h | 1 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_nse.c | 1 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_routing.c | 1 | ||||
-rw-r--r-- | src/dht/plugin_block_dht.c | 1 | ||||
-rw-r--r-- | src/dht/test_dht_api.c | 1 | ||||
-rw-r--r-- | src/dht/test_dht_topo.c | 1 |
16 files changed, 17 insertions, 12 deletions
diff --git a/src/dht/dht.h b/src/dht/dht.h index 052a60b99..86f1b9b49 100644 --- a/src/dht/dht.h +++ b/src/dht/dht.h | |||
@@ -137,7 +137,6 @@ struct GNUNET_DHT_ClientGetResultSeenMessage | |||
137 | }; | 137 | }; |
138 | 138 | ||
139 | 139 | ||
140 | |||
141 | /** | 140 | /** |
142 | * Reply to a GET send from the service to a client. | 141 | * Reply to a GET send from the service to a client. |
143 | */ | 142 | */ |
diff --git a/src/dht/dht_test_lib.c b/src/dht/dht_test_lib.c index e18d2ab24..0d382cd74 100644 --- a/src/dht/dht_test_lib.c +++ b/src/dht/dht_test_lib.c | |||
@@ -213,4 +213,5 @@ GNUNET_DHT_TEST_run (const char *testname, | |||
213 | &dht_test_run, ctx); | 213 | &dht_test_run, ctx); |
214 | } | 214 | } |
215 | 215 | ||
216 | |||
216 | /* end of dht_test_lib.c */ | 217 | /* end of dht_test_lib.c */ |
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c index aacd4ac98..c8a1cb735 100644 --- a/src/dht/gnunet-dht-get.c +++ b/src/dht/gnunet-dht-get.c | |||
@@ -286,4 +286,5 @@ main (int argc, char *const *argv) | |||
286 | : 1; | 286 | : 1; |
287 | } | 287 | } |
288 | 288 | ||
289 | |||
289 | /* end of gnunet-dht-get.c */ | 290 | /* end of gnunet-dht-get.c */ |
diff --git a/src/dht/gnunet-dht-monitor.c b/src/dht/gnunet-dht-monitor.c index d0cd4cff1..8dc14e223 100644 --- a/src/dht/gnunet-dht-monitor.c +++ b/src/dht/gnunet-dht-monitor.c | |||
@@ -284,6 +284,7 @@ run (void *cls, | |||
284 | NULL); | 284 | NULL); |
285 | } | 285 | } |
286 | 286 | ||
287 | |||
287 | /** | 288 | /** |
288 | * Entry point for gnunet-dht-monitor | 289 | * Entry point for gnunet-dht-monitor |
289 | * | 290 | * |
@@ -340,4 +341,5 @@ main (int argc, char *const *argv) | |||
340 | : 1; | 341 | : 1; |
341 | } | 342 | } |
342 | 343 | ||
344 | |||
343 | /* end of gnunet-dht-monitor.c */ | 345 | /* end of gnunet-dht-monitor.c */ |
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c index d8bffbf37..7ee4ec185 100644 --- a/src/dht/gnunet-dht-put.c +++ b/src/dht/gnunet-dht-put.c | |||
@@ -168,6 +168,7 @@ run (void *cls, | |||
168 | NULL); | 168 | NULL); |
169 | } | 169 | } |
170 | 170 | ||
171 | |||
171 | /** | 172 | /** |
172 | * Entry point for gnunet-dht-put | 173 | * Entry point for gnunet-dht-put |
173 | * | 174 | * |
@@ -236,4 +237,5 @@ main (int argc, char *const *argv) | |||
236 | : 1; | 237 | : 1; |
237 | } | 238 | } |
238 | 239 | ||
240 | |||
239 | /* end of gnunet-dht-put.c */ | 241 | /* end of gnunet-dht-put.c */ |
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index 380002deb..2dd49a1b6 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c | |||
@@ -161,6 +161,4 @@ run (void *cls, | |||
161 | GDS_DHT_SERVICE_INIT ("dht", &run); | 161 | GDS_DHT_SERVICE_INIT ("dht", &run); |
162 | 162 | ||
163 | 163 | ||
164 | |||
165 | |||
166 | /* end of gnunet-service-dht.c */ | 164 | /* end of gnunet-service-dht.c */ |
diff --git a/src/dht/gnunet-service-dht.h b/src/dht/gnunet-service-dht.h index 2574edc7b..6741efb4e 100644 --- a/src/dht/gnunet-service-dht.h +++ b/src/dht/gnunet-service-dht.h | |||
@@ -59,7 +59,6 @@ extern struct GNUNET_STATISTICS_Handle *GDS_stats; | |||
59 | extern struct GNUNET_MessageHeader *GDS_my_hello; | 59 | extern struct GNUNET_MessageHeader *GDS_my_hello; |
60 | 60 | ||
61 | 61 | ||
62 | |||
63 | /** | 62 | /** |
64 | * Handle a reply we've received from another peer. If the reply | 63 | * Handle a reply we've received from another peer. If the reply |
65 | * matches any of our pending queries, forward it to the respective | 64 | * matches any of our pending queries, forward it to the respective |
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c index 932b04d9b..be6e22d01 100644 --- a/src/dht/gnunet-service-dht_clients.c +++ b/src/dht/gnunet-service-dht_clients.c | |||
@@ -1318,7 +1318,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type, | |||
1318 | cl_size = 0; | 1318 | cl_size = 0; |
1319 | for (m = monitor_head; NULL != m; m = m->next) | 1319 | for (m = monitor_head; NULL != m; m = m->next) |
1320 | { | 1320 | { |
1321 | if (((GNUNET_BLOCK_TYPE_ANY == m->type) ||(m->type == type) ) && | 1321 | if (((GNUNET_BLOCK_TYPE_ANY == m->type) || (m->type == type) ) && |
1322 | ((NULL == m->key) || | 1322 | ((NULL == m->key) || |
1323 | (memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0) )) | 1323 | (memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0) )) |
1324 | { | 1324 | { |
@@ -1402,7 +1402,7 @@ GDS_CLIENTS_process_put (uint32_t options, | |||
1402 | cl_size = 0; | 1402 | cl_size = 0; |
1403 | for (m = monitor_head; NULL != m; m = m->next) | 1403 | for (m = monitor_head; NULL != m; m = m->next) |
1404 | { | 1404 | { |
1405 | if (((GNUNET_BLOCK_TYPE_ANY == m->type) ||(m->type == type) ) && | 1405 | if (((GNUNET_BLOCK_TYPE_ANY == m->type) || (m->type == type) ) && |
1406 | ((NULL == m->key) || | 1406 | ((NULL == m->key) || |
1407 | (memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0) )) | 1407 | (memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0) )) |
1408 | { | 1408 | { |
@@ -1540,4 +1540,5 @@ GDS_CLIENTS_done () | |||
1540 | } | 1540 | } |
1541 | } | 1541 | } |
1542 | 1542 | ||
1543 | |||
1543 | /* end of gnunet-service-dht_clients.c */ | 1544 | /* end of gnunet-service-dht_clients.c */ |
diff --git a/src/dht/gnunet-service-dht_hello.c b/src/dht/gnunet-service-dht_hello.c index e57951ab1..a0141d1fb 100644 --- a/src/dht/gnunet-service-dht_hello.c +++ b/src/dht/gnunet-service-dht_hello.c | |||
@@ -144,4 +144,5 @@ GDS_HELLO_done () | |||
144 | } | 144 | } |
145 | } | 145 | } |
146 | 146 | ||
147 | |||
147 | /* end of gnunet-service-dht_hello.c */ | 148 | /* end of gnunet-service-dht_hello.c */ |
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index fe9dd3e9c..c251dfa12 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c | |||
@@ -907,11 +907,8 @@ get_distance (const struct GNUNET_HashCode *target, | |||
907 | * use the highest 2^9 bits of the result to signify the | 907 | * use the highest 2^9 bits of the result to signify the |
908 | * number of (mis)matching LSB bits; if we have 0 matching | 908 | * number of (mis)matching LSB bits; if we have 0 matching |
909 | * and hence 512 mismatching LSB bits we return -1 (since | 909 | * and hence 512 mismatching LSB bits we return -1 (since |
910 | * 512 itself cannot be represented with 9 bits) */ | 910 | * 512 itself cannot be represented with 9 bits) *//* first, calculate the most significant 9 bits of our |
911 | 911 | * result, aka the number of LSBs */bucket = GNUNET_CRYPTO_hash_matching_bits (target, | |
912 | /* first, calculate the most significant 9 bits of our | ||
913 | * result, aka the number of LSBs */ | ||
914 | bucket = GNUNET_CRYPTO_hash_matching_bits (target, | ||
915 | have); | 912 | have); |
916 | /* bucket is now a value between 0 and 512 */ | 913 | /* bucket is now a value between 0 and 512 */ |
917 | if (bucket == 512) | 914 | if (bucket == 512) |
diff --git a/src/dht/gnunet-service-dht_neighbours.h b/src/dht/gnunet-service-dht_neighbours.h index cdcf30b01..55cc5b135 100644 --- a/src/dht/gnunet-service-dht_neighbours.h +++ b/src/dht/gnunet-service-dht_neighbours.h | |||
@@ -143,7 +143,6 @@ GDS_am_closest_peer (const struct GNUNET_HashCode *key, | |||
143 | const struct GNUNET_CONTAINER_BloomFilter *bloom); | 143 | const struct GNUNET_CONTAINER_BloomFilter *bloom); |
144 | 144 | ||
145 | 145 | ||
146 | |||
147 | /** | 146 | /** |
148 | * Initialize neighbours subsystem. | 147 | * Initialize neighbours subsystem. |
149 | * | 148 | * |
diff --git a/src/dht/gnunet-service-dht_nse.c b/src/dht/gnunet-service-dht_nse.c index 89107be16..7f411cf71 100644 --- a/src/dht/gnunet-service-dht_nse.c +++ b/src/dht/gnunet-service-dht_nse.c | |||
@@ -113,4 +113,5 @@ GDS_NSE_done () | |||
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | |||
116 | /* end of gnunet-service-dht_nse.c */ | 117 | /* end of gnunet-service-dht_nse.c */ |
diff --git a/src/dht/gnunet-service-dht_routing.c b/src/dht/gnunet-service-dht_routing.c index 3454c1acb..75513f833 100644 --- a/src/dht/gnunet-service-dht_routing.c +++ b/src/dht/gnunet-service-dht_routing.c | |||
@@ -484,4 +484,5 @@ GDS_ROUTING_done () | |||
484 | recent_map = NULL; | 484 | recent_map = NULL; |
485 | } | 485 | } |
486 | 486 | ||
487 | |||
487 | /* end of gnunet-service-dht_routing.c */ | 488 | /* end of gnunet-service-dht_routing.c */ |
diff --git a/src/dht/plugin_block_dht.c b/src/dht/plugin_block_dht.c index 084384146..f213433ed 100644 --- a/src/dht/plugin_block_dht.c +++ b/src/dht/plugin_block_dht.c | |||
@@ -247,4 +247,5 @@ libgnunet_plugin_block_dht_done (void *cls) | |||
247 | return NULL; | 247 | return NULL; |
248 | } | 248 | } |
249 | 249 | ||
250 | |||
250 | /* end of plugin_block_dht.c */ | 251 | /* end of plugin_block_dht.c */ |
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c index a62ee9668..957c71d7f 100644 --- a/src/dht/test_dht_api.c +++ b/src/dht/test_dht_api.c | |||
@@ -189,4 +189,5 @@ main (int argc, | |||
189 | return ok; | 189 | return ok; |
190 | } | 190 | } |
191 | 191 | ||
192 | |||
192 | /* end of test_dht_api.c */ | 193 | /* end of test_dht_api.c */ |
diff --git a/src/dht/test_dht_topo.c b/src/dht/test_dht_topo.c index d92095cc6..7f737ea03 100644 --- a/src/dht/test_dht_topo.c +++ b/src/dht/test_dht_topo.c | |||
@@ -528,4 +528,5 @@ main (int xargc, char *xargv[]) | |||
528 | return ok; | 528 | return ok; |
529 | } | 529 | } |
530 | 530 | ||
531 | |||
531 | /* end of test_dht_topo.c */ | 532 | /* end of test_dht_topo.c */ |