aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-06 15:24:26 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-06 15:24:26 +0000
commit3d7bae58c4b9b128e6000a2fe1fe65595235bb14 (patch)
treed50cfa569c5d447da5663333e61964c47ac09f73 /src
parent6cef8fea0c3b6756870786ebc4db0588373c8f65 (diff)
downloadgnunet-3d7bae58c4b9b128e6000a2fe1fe65595235bb14.tar.gz
gnunet-3d7bae58c4b9b128e6000a2fe1fe65595235bb14.zip
misc fixes
Diffstat (limited to 'src')
-rw-r--r--src/arm/gnunet-service-arm.c22
-rw-r--r--src/ats-tests/ats-testing-log.c2
-rw-r--r--src/ats-tests/gnunet-ats-sim.c77
-rw-r--r--src/ats-tests/perf_ats.c8
-rw-r--r--src/ats/ats_api_scheduling.c1
-rw-r--r--src/conversation/conversation.h8
-rw-r--r--src/conversation/conversation_api.c2
-rw-r--r--src/conversation/gnunet-service-conversation.c4
-rw-r--r--src/datastore/gnunet-service-datastore.c39
-rw-r--r--src/datastore/plugin_datastore_mysql.c1
-rw-r--r--src/gnsrecord/plugin_gnsrecord_dns.c5
-rw-r--r--src/nse/perf_kdf.c4
-rw-r--r--src/regex/regex_internal.c4
-rw-r--r--src/set/gnunet-service-set_union.c5
-rw-r--r--src/testbed-logger/testbed_logger_api.c2
-rw-r--r--src/testbed/gnunet-daemon-testbed-blacklist.c3
-rw-r--r--src/util/test_container_multihashmap.c6
-rw-r--r--src/util/test_container_multipeermap.c6
18 files changed, 116 insertions, 83 deletions
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index 8bc6e9e07..4c60897e5 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -464,17 +464,17 @@ start_process (struct ServiceList *sl,
464 fin_options = GNUNET_strdup (final_option); 464 fin_options = GNUNET_strdup (final_option);
465 /* replace '{}' with service name */ 465 /* replace '{}' with service name */
466 while (NULL != (optpos = strstr (fin_options, "{}"))) 466 while (NULL != (optpos = strstr (fin_options, "{}")))
467 { 467 {
468 /* terminate string at opening parenthesis */ 468 /* terminate string at opening parenthesis */
469 *optpos = 0; 469 *optpos = 0;
470 GNUNET_asprintf (&new_options, 470 GNUNET_asprintf (&new_options,
471 "%s%s%s", 471 "%s%s%s",
472 fin_options, 472 fin_options,
473 sl->name, 473 sl->name,
474 optpos + 2); 474 optpos + 2);
475 GNUNET_free (fin_options); 475 GNUNET_free (fin_options);
476 fin_options = new_options; 476 fin_options = new_options;
477 } 477 }
478 if (NULL != options) 478 if (NULL != options)
479 { 479 {
480 /* combine "fin_options" with "options" */ 480 /* combine "fin_options" with "options" */
diff --git a/src/ats-tests/ats-testing-log.c b/src/ats-tests/ats-testing-log.c
index 61aca6b18..6e8e3bd13 100644
--- a/src/ats-tests/ats-testing-log.c
+++ b/src/ats-tests/ats-testing-log.c
@@ -693,7 +693,7 @@ GNUNET_ATS_TEST_logging_now (struct LoggingHandle *l)
693 else 693 else
694 { 694 {
695 mlt->total_throughput_send = mult * mlt->total_bytes_sent; 695 mlt->total_throughput_send = mult * mlt->total_bytes_sent;
696 mlt->total_throughput_send = mult * mlt->total_bytes_received; 696 mlt->total_throughput_recv = mult * mlt->total_bytes_received;
697 } 697 }
698 698
699 if (GNUNET_YES == l->verbose) 699 if (GNUNET_YES == l->verbose)
diff --git a/src/ats-tests/gnunet-ats-sim.c b/src/ats-tests/gnunet-ats-sim.c
index 27850e3e7..f624c2b21 100644
--- a/src/ats-tests/gnunet-ats-sim.c
+++ b/src/ats-tests/gnunet-ats-sim.c
@@ -57,10 +57,12 @@ static int opt_plot;
57 */ 57 */
58static int opt_verbose; 58static int opt_verbose;
59 59
60struct GNUNET_SCHEDULER_Task * timeout_task; 60static struct GNUNET_SCHEDULER_Task *timeout_task;
61
62static struct Experiment *e;
63
64static struct LoggingHandle *l;
61 65
62struct Experiment *e;
63struct LoggingHandle *l;
64 66
65static void 67static void
66evaluate (struct GNUNET_TIME_Relative duration_total) 68evaluate (struct GNUNET_TIME_Relative duration_total)
@@ -125,11 +127,16 @@ evaluate (struct GNUNET_TIME_Relative duration_total)
125 } 127 }
126} 128}
127 129
130
128static void 131static void
129do_shutdown () 132do_shutdown (void *cls)
130{ 133{
131 fprintf (stderr, "Shutdown\n"); 134 fprintf (stderr, "Shutdown\n");
132 /* timeout */ 135 if (NULL != timeout_task)
136 {
137 GNUNET_SCHEDULER_cancel (timeout_task);
138 timeout_task = NULL;
139 }
133 if (NULL != l) 140 if (NULL != l)
134 { 141 {
135 GNUNET_ATS_TEST_logging_stop (l); 142 GNUNET_ATS_TEST_logging_stop (l);
@@ -153,9 +160,17 @@ do_shutdown ()
153 160
154 161
155static void 162static void
163do_timeout (void *cls)
164{
165 timeout_task = NULL;
166 GNUNET_SCHEDULER_shutdown ();
167}
168
169
170static void
156transport_recv_cb (void *cls, 171transport_recv_cb (void *cls,
157 const struct GNUNET_PeerIdentity * peer, 172 const struct GNUNET_PeerIdentity *peer,
158 const struct GNUNET_MessageHeader * message) 173 const struct GNUNET_MessageHeader *message)
159{ 174{
160 175
161} 176}
@@ -175,19 +190,19 @@ log_request__cb (void *cls, const struct GNUNET_HELLO_Address *address,
175 190
176} 191}
177 192
193
178static void 194static void
179experiment_done_cb (struct Experiment *e, struct GNUNET_TIME_Relative duration,int success) 195experiment_done_cb (struct Experiment *e,
196 struct GNUNET_TIME_Relative duration,int success)
180{ 197{
181 if (GNUNET_OK == success) 198 if (GNUNET_OK == success)
182 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Experiment done successful in %s\n", 199 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
183 GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES)); 200 "Experiment done successful in %s\n",
201 GNUNET_STRINGS_relative_time_to_string (duration,
202 GNUNET_YES));
184 else 203 else
185 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Experiment failed \n"); 204 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Experiment failed \n");
186 if (NULL != timeout_task) 205
187 {
188 GNUNET_SCHEDULER_cancel (timeout_task);
189 timeout_task = NULL;
190 }
191 /* Stop logging */ 206 /* Stop logging */
192 GNUNET_ATS_TEST_logging_stop (l); 207 GNUNET_ATS_TEST_logging_stop (l);
193 208
@@ -200,31 +215,20 @@ experiment_done_cb (struct Experiment *e, struct GNUNET_TIME_Relative duration,i
200 evaluate (duration); 215 evaluate (duration);
201 if (opt_log) 216 if (opt_log)
202 GNUNET_ATS_TEST_logging_write_to_file(l, opt_exp_file, opt_plot); 217 GNUNET_ATS_TEST_logging_write_to_file(l, opt_exp_file, opt_plot);
203 218 GNUNET_SCHEDULER_shutdown ();
204 if (NULL != l)
205 {
206 GNUNET_ATS_TEST_logging_stop (l);
207 GNUNET_ATS_TEST_logging_clean_up (l);
208 l = NULL;
209 }
210
211 /* Clean up experiment */
212 GNUNET_ATS_TEST_experimentation_stop (e);
213 e = NULL;
214
215 /* Shutdown topology */
216 GNUNET_ATS_TEST_shutdown_topology ();
217} 219}
218 220
221
219static void 222static void
220episode_done_cb (struct Episode *ep) 223episode_done_cb (struct Episode *ep)
221{ 224{
222 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Episode %u done\n", ep->id); 225 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Episode %u done\n", ep->id);
223} 226}
224 227
228
225static void topology_setup_done (void *cls, 229static void topology_setup_done (void *cls,
226 struct BenchmarkPeer *masters, 230 struct BenchmarkPeer *masters,
227 struct BenchmarkPeer *slaves) 231 struct BenchmarkPeer *slaves)
228{ 232{
229 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Topology setup complete!\n"); 233 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Topology setup complete!\n");
230 234
@@ -309,10 +313,15 @@ static void topology_setup_done (void *cls,
309 } 313 }
310#endif 314#endif
311 315
312 timeout_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_add (GNUNET_TIME_UNIT_MINUTES, 316 timeout_task
313 e->max_duration), &do_shutdown, NULL); 317 = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_add (GNUNET_TIME_UNIT_MINUTES,
318 e->max_duration),
319 &do_timeout,
320 NULL);
321 GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL);
314} 322}
315 323
324
316static void 325static void
317parse_args (int argc, char *argv[]) 326parse_args (int argc, char *argv[])
318{ 327{
@@ -325,6 +334,7 @@ parse_args (int argc, char *argv[])
325 { 334 {
326 if ((c < (argc - 1)) && (0 == strcmp (argv[c], "-e"))) 335 if ((c < (argc - 1)) && (0 == strcmp (argv[c], "-e")))
327 { 336 {
337 GNUNET_free_non_null (opt_exp_file);
328 opt_exp_file = GNUNET_strdup ( argv[c + 1]); 338 opt_exp_file = GNUNET_strdup ( argv[c + 1]);
329 } 339 }
330 if (0 == strcmp (argv[c], "-l")) 340 if (0 == strcmp (argv[c], "-l"))
@@ -342,6 +352,7 @@ parse_args (int argc, char *argv[])
342 } 352 }
343} 353}
344 354
355
345int 356int
346main (int argc, char *argv[]) 357main (int argc, char *argv[])
347{ 358{
diff --git a/src/ats-tests/perf_ats.c b/src/ats-tests/perf_ats.c
index 0e4056a6c..a7c1dc3bf 100644
--- a/src/ats-tests/perf_ats.c
+++ b/src/ats-tests/perf_ats.c
@@ -137,14 +137,12 @@ evaluate ()
137 double kb_recv_percent; 137 double kb_recv_percent;
138 unsigned int rtt; 138 unsigned int rtt;
139 139
140 duration = (perf_duration.rel_value_us / (1000 * 1000)); 140 duration = 1 + (perf_duration.rel_value_us / (1000 * 1000));
141 for (c_m = 0; c_m < num_masters; c_m++) 141 for (c_m = 0; c_m < num_masters; c_m++)
142 { 142 {
143 mp = &mps[c_m]; 143 mp = &mps[c_m];
144 if (NULL == mp)
145 continue;
146 fprintf (stderr, 144 fprintf (stderr,
147 _("Master [%u]: sent: %u KiB in %u sec. = %u KiB/s, received: %u KiB in %u sec. = %u KiB/s\n"), 145 "Master [%u]: sent: %u KiB in %u sec. = %u KiB/s, received: %u KiB in %u sec. = %u KiB/s\n",
148 mp->no, mp->total_bytes_sent / 1024, duration, 146 mp->no, mp->total_bytes_sent / 1024, duration,
149 (mp->total_bytes_sent / 1024) / duration, 147 (mp->total_bytes_sent / 1024) / duration,
150 mp->total_bytes_received / 1024, duration, 148 mp->total_bytes_received / 1024, duration,
@@ -153,8 +151,6 @@ evaluate ()
153 for (c_s = 0; c_s < num_slaves; c_s++) 151 for (c_s = 0; c_s < num_slaves; c_s++)
154 { 152 {
155 p = &mp->partners[c_s]; 153 p = &mp->partners[c_s];
156 if (NULL == p)
157 continue;
158 kb_sent_sec = 0; 154 kb_sent_sec = 0;
159 kb_recv_sec = 0; 155 kb_recv_sec = 0;
160 kb_sent_percent = 0.0; 156 kb_sent_percent = 0.0;
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c
index bcca89456..669e2db71 100644
--- a/src/ats/ats_api_scheduling.c
+++ b/src/ats/ats_api_scheduling.c
@@ -253,6 +253,7 @@ find_empty_session_slot (struct GNUNET_ATS_SchedulingHandle *sh)
253 static uint32_t off; 253 static uint32_t off;
254 uint32_t i; 254 uint32_t i;
255 255
256 GNUNET_assert (0 != sh->session_array_size);
256 i = 0; 257 i = 0;
257 while ( ( (NOT_FOUND == off) || 258 while ( ( (NOT_FOUND == off) ||
258 (NULL != sh->session_array[off % sh->session_array_size]) ) && 259 (NULL != sh->session_array[off % sh->session_array_size]) ) &&
diff --git a/src/conversation/conversation.h b/src/conversation/conversation.h
index aaeed1df3..1bd358e78 100644
--- a/src/conversation/conversation.h
+++ b/src/conversation/conversation.h
@@ -40,6 +40,14 @@ extern "C"
40 40
41 41
42/** 42/**
43 * Highest bit in a 32-bit unsigned integer,
44 * bit set if we are making an outgoing call,
45 * bit unset for local lines.
46 */
47#define HIGH_BIT ((uint32_t) (1LL << 31))
48
49
50/**
43 * Message to transmit the audio (between client and helpers). 51 * Message to transmit the audio (between client and helpers).
44 */ 52 */
45struct AudioMessage 53struct AudioMessage
diff --git a/src/conversation/conversation_api.c b/src/conversation/conversation_api.c
index 730cf1c70..e3bab295e 100644
--- a/src/conversation/conversation_api.c
+++ b/src/conversation/conversation_api.c
@@ -609,7 +609,7 @@ GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
609 "LINE"); 609 "LINE");
610 return NULL; 610 return NULL;
611 } 611 }
612 if (line >= (1 << 31)) 612 if (line >= HIGH_BIT)
613 { 613 {
614 GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, 614 GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
615 "CONVERSATION", 615 "CONVERSATION",
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c
index 425f0a3c2..3b2237229 100644
--- a/src/conversation/gnunet-service-conversation.c
+++ b/src/conversation/gnunet-service-conversation.c
@@ -285,7 +285,7 @@ handle_client_register_message (void *cls,
285 GNUNET_CONTAINER_DLL_insert (lines_head, 285 GNUNET_CONTAINER_DLL_insert (lines_head,
286 lines_tail, 286 lines_tail,
287 line); 287 line);
288 line->local_line = ntohl (msg->line) & (~ (1 << 31)); 288 line->local_line = ntohl (msg->line) & (~ HIGH_BIT);
289 GNUNET_SERVER_receive_done (client, GNUNET_OK); 289 GNUNET_SERVER_receive_done (client, GNUNET_OK);
290} 290}
291 291
@@ -703,7 +703,7 @@ handle_client_call_message (void *cls,
703 } 703 }
704 line = GNUNET_new (struct Line); 704 line = GNUNET_new (struct Line);
705 line->client = client; 705 line->client = client;
706 line->local_line = (local_line_cnt++) | (1 << 31); 706 line->local_line = (local_line_cnt++) | HIGH_BIT;
707 GNUNET_SERVER_client_set_user_context (client, line); 707 GNUNET_SERVER_client_set_user_context (client, line);
708 GNUNET_SERVER_notification_context_add (nc, client); 708 GNUNET_SERVER_notification_context_add (nc, client);
709 GNUNET_CONTAINER_DLL_insert (lines_head, 709 GNUNET_CONTAINER_DLL_insert (lines_head,
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index 8f4df3ba7..898b6a9d8 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -37,6 +37,11 @@
37#define MAX_PENDING 1024 37#define MAX_PENDING 1024
38 38
39/** 39/**
40 * Limit size of bloom filter to 2 GB.
41 */
42#define MAX_BF_SIZE ((uint32_t) (1LL << 31))
43
44/**
40 * How long are we at most keeping "expired" content 45 * How long are we at most keeping "expired" content
41 * past the expiration date in the database? 46 * past the expiration date in the database?
42 */ 47 */
@@ -184,7 +189,7 @@ static unsigned long long payload;
184 * Identity of the task that is used to delete 189 * Identity of the task that is used to delete
185 * expired content. 190 * expired content.
186 */ 191 */
187static struct GNUNET_SCHEDULER_Task * expired_kill_task; 192static struct GNUNET_SCHEDULER_Task *expired_kill_task;
188 193
189/** 194/**
190 * Minimum time that content should have to not be discarded instantly 195 * Minimum time that content should have to not be discarded instantly
@@ -537,7 +542,8 @@ transmit_callback (void *cls, size_t size, void *buf)
537 * @param msg message to transmit, will be freed! 542 * @param msg message to transmit, will be freed!
538 */ 543 */
539static void 544static void
540transmit (struct GNUNET_SERVER_Client *client, struct GNUNET_MessageHeader *msg) 545transmit (struct GNUNET_SERVER_Client *client,
546 struct GNUNET_MessageHeader *msg)
541{ 547{
542 struct TransmitCallbackContext *tcc; 548 struct TransmitCallbackContext *tcc;
543 549
@@ -611,14 +617,18 @@ transmit_status (struct GNUNET_SERVER_Client *client, int code, const char *msg)
611 * @param expiration expiration time for the content 617 * @param expiration expiration time for the content
612 * @param uid unique identifier for the datum; 618 * @param uid unique identifier for the datum;
613 * maybe 0 if no unique identifier is available 619 * maybe 0 if no unique identifier is available
614 * 620 * @return #GNUNET_SYSERR to abort the iteration, #GNUNET_OK to continue,
615 * @return GNUNET_SYSERR to abort the iteration, GNUNET_OK to continue, 621 * #GNUNET_NO to delete the item and continue (if supported)
616 * GNUNET_NO to delete the item and continue (if supported)
617 */ 622 */
618static int 623static int
619transmit_item (void *cls, const struct GNUNET_HashCode * key, uint32_t size, 624transmit_item (void *cls,
620 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 625 const struct GNUNET_HashCode *key,
621 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 626 uint32_t size,
627 const void *data,
628 enum GNUNET_BLOCK_Type type,
629 uint32_t priority,
630 uint32_t anonymity,
631 struct GNUNET_TIME_Absolute expiration,
622 uint64_t uid) 632 uint64_t uid)
623{ 633{
624 struct GNUNET_SERVER_Client *client = cls; 634 struct GNUNET_SERVER_Client *client = cls;
@@ -1798,12 +1808,17 @@ run (void *cls,
1798 return; 1808 return;
1799 } 1809 }
1800 stats = GNUNET_STATISTICS_create ("datastore", cfg); 1810 stats = GNUNET_STATISTICS_create ("datastore", cfg);
1801 GNUNET_STATISTICS_set (stats, gettext_noop ("# quota"), quota, GNUNET_NO); 1811 GNUNET_STATISTICS_set (stats,
1812 gettext_noop ("# quota"),
1813 quota,
1814 GNUNET_NO);
1802 cache_size = quota / 8; /* Or should we make this an option? */ 1815 cache_size = quota / 8; /* Or should we make this an option? */
1803 GNUNET_STATISTICS_set (stats, gettext_noop ("# cache size"), cache_size, 1816 GNUNET_STATISTICS_set (stats,
1817 gettext_noop ("# cache size"),
1818 cache_size,
1804 GNUNET_NO); 1819 GNUNET_NO);
1805 if (quota / (32 * 1024LL) > (1 << 31)) 1820 if (quota / (32 * 1024LL) > MAX_BF_SIZE)
1806 bf_size = (1 << 31); /* absolute limit: ~2 GB, beyond that BF just won't help anyway */ 1821 bf_size = MAX_BF_SIZE;
1807 else 1822 else
1808 bf_size = quota / (32 * 1024LL); /* 8 bit per entry, 1 bit per 32 kb in DB */ 1823 bf_size = quota / (32 * 1024LL); /* 8 bit per entry, 1 bit per 32 kb in DB */
1809 fn = NULL; 1824 fn = NULL;
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c
index 0ae5c1a2e..d76b4ccb4 100644
--- a/src/datastore/plugin_datastore_mysql.c
+++ b/src/datastore/plugin_datastore_mysql.c
@@ -990,6 +990,7 @@ mysql_plugin_get_keys (void *cls,
990 proc (proc_cls, NULL, 0); 990 proc (proc_cls, NULL, 0);
991 return; 991 return;
992 } 992 }
993 memset (&last, 0, sizeof (last)); /* make static analysis happy */
993 ret = GNUNET_YES; 994 ret = GNUNET_YES;
994 cnt = 0; 995 cnt = 0;
995 while (ret == GNUNET_YES) 996 while (ret == GNUNET_YES)
diff --git a/src/gnsrecord/plugin_gnsrecord_dns.c b/src/gnsrecord/plugin_gnsrecord_dns.c
index 09125b9d5..aa64f0dd6 100644
--- a/src/gnsrecord/plugin_gnsrecord_dns.c
+++ b/src/gnsrecord/plugin_gnsrecord_dns.c
@@ -265,7 +265,7 @@ dns_value_to_string (void *cls,
265 * @return the value, 0 if not found 265 * @return the value, 0 if not found
266 */ 266 */
267static unsigned int 267static unsigned int
268rfc4394_mnemonic_to_value (const char *mnemonic) 268rfc4398_mnemonic_to_value (const char *mnemonic)
269{ 269{
270 static struct { 270 static struct {
271 const char *mnemonic; 271 const char *mnemonic;
@@ -425,7 +425,7 @@ dns_string_to_value (void *cls,
425 sdup = GNUNET_strdup (s); 425 sdup = GNUNET_strdup (s);
426 typep = strtok (sdup, " "); 426 typep = strtok (sdup, " ");
427 if ( (NULL == typep) || 427 if ( (NULL == typep) ||
428 ( (0 == (type = rfc4394_mnemonic_to_value (typep))) && 428 ( (0 == (type = rfc4398_mnemonic_to_value (typep))) &&
429 ( (1 != SSCANF (typep, 429 ( (1 != SSCANF (typep,
430 "%u", 430 "%u",
431 &type)) || 431 &type)) ||
@@ -444,6 +444,7 @@ dns_string_to_value (void *cls,
444 GNUNET_free (sdup); 444 GNUNET_free (sdup);
445 return GNUNET_SYSERR; 445 return GNUNET_SYSERR;
446 } 446 }
447 alg = 0;
447 algp = strtok (NULL, " "); 448 algp = strtok (NULL, " ");
448 if ( (NULL == algp) || 449 if ( (NULL == algp) ||
449 ( (0 == (type = rfc4034_mnemonic_to_value (typep))) && 450 ( (0 == (type = rfc4034_mnemonic_to_value (typep))) &&
diff --git a/src/nse/perf_kdf.c b/src/nse/perf_kdf.c
index 4981eae5d..61e477874 100644
--- a/src/nse/perf_kdf.c
+++ b/src/nse/perf_kdf.c
@@ -76,9 +76,9 @@ main (int argc, char *argv[])
76 GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (start), 76 GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (start),
77 GNUNET_YES)); 77 GNUNET_YES));
78 GAUGER ("NSE", "Proof-of-work hashing", 78 GAUGER ("NSE", "Proof-of-work hashing",
79 1024LL / (1LL + 79 1024.0 / (1.0 +
80 GNUNET_TIME_absolute_get_duration 80 GNUNET_TIME_absolute_get_duration
81 (start).rel_value_us / 1000LL), "hashes/ms"); 81 (start).rel_value_us / 1000.0), "hashes/ms");
82 return 0; 82 return 0;
83} 83}
84 84
diff --git a/src/regex/regex_internal.c b/src/regex/regex_internal.c
index cb78545b9..1d39efca1 100644
--- a/src/regex/regex_internal.c
+++ b/src/regex/regex_internal.c
@@ -2010,7 +2010,7 @@ dfa_merge_nondistinguishable_states (struct REGEX_INTERNAL_Context *ctx,
2010 if ( (s1->accepting && !s2->accepting) || 2010 if ( (s1->accepting && !s2->accepting) ||
2011 (!s1->accepting && s2->accepting) ) 2011 (!s1->accepting && s2->accepting) )
2012 { 2012 {
2013 idx = s1->marked * state_cnt + s2->marked; 2013 idx = (unsigned long long) s1->marked * state_cnt + s2->marked;
2014 table[idx / 32] |= (1 << (idx % 32)); 2014 table[idx / 32] |= (1 << (idx % 32));
2015 } 2015 }
2016 2016
@@ -2023,7 +2023,7 @@ dfa_merge_nondistinguishable_states (struct REGEX_INTERNAL_Context *ctx,
2023 { 2023 {
2024 for (s2 = a->states_head; NULL != s2 && s1 != s2; s2 = s2->next) 2024 for (s2 = a->states_head; NULL != s2 && s1 != s2; s2 = s2->next)
2025 { 2025 {
2026 idx = s1->marked * state_cnt + s2->marked; 2026 idx = (unsigned long long) s1->marked * state_cnt + s2->marked;
2027 if (0 != (table[idx / 32] & (1 << (idx % 32)))) 2027 if (0 != (table[idx / 32] & (1 << (idx % 32))))
2028 continue; 2028 continue;
2029 num_equal_edges = 0; 2029 num_equal_edges = 0;
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c
index aeb706ec3..c7f30a741 100644
--- a/src/set/gnunet-service-set_union.c
+++ b/src/set/gnunet-service-set_union.c
@@ -449,7 +449,7 @@ op_register_element (struct Operation *op,
449 449
450static void 450static void
451salt_key (const struct IBF_Key *k_in, 451salt_key (const struct IBF_Key *k_in,
452 uint32_t salt, 452 uint32_t salt,
453 struct IBF_Key *k_out) 453 struct IBF_Key *k_out)
454{ 454{
455 int s = salt % 64; 455 int s = salt % 64;
@@ -462,7 +462,7 @@ salt_key (const struct IBF_Key *k_in,
462 462
463static void 463static void
464unsalt_key (const struct IBF_Key *k_in, 464unsalt_key (const struct IBF_Key *k_in,
465 uint32_t salt, 465 uint32_t salt,
466 struct IBF_Key *k_out) 466 struct IBF_Key *k_out)
467{ 467{
468 int s = salt % 64; 468 int s = salt % 64;
@@ -752,6 +752,7 @@ handle_p2p_strata_estimator (void *cls,
752 { 752 {
753 /* decompression failed */ 753 /* decompression failed */
754 fail_union_operation (op); 754 fail_union_operation (op);
755 strata_estimator_destroy (remote_se);
755 return GNUNET_SYSERR; 756 return GNUNET_SYSERR;
756 } 757 }
757 GNUNET_assert (NULL != op->state->se); 758 GNUNET_assert (NULL != op->state->se);
diff --git a/src/testbed-logger/testbed_logger_api.c b/src/testbed-logger/testbed_logger_api.c
index de64048c5..9d8aa9ad3 100644
--- a/src/testbed-logger/testbed_logger_api.c
+++ b/src/testbed-logger/testbed_logger_api.c
@@ -312,7 +312,7 @@ GNUNET_TESTBED_LOGGER_flush (struct GNUNET_TESTBED_LOGGER_Handle *h,
312 h->cb = cb; 312 h->cb = cb;
313 h->cb_cls = cb_cls; 313 h->cb_cls = cb_cls;
314 if ( (NULL == h->mq) || 314 if ( (NULL == h->mq) ||
315 (NULL == h->buf) ) 315 (0 == h->buse) )
316 { 316 {
317 trigger_flush_notification (h); 317 trigger_flush_notification (h);
318 return; 318 return;
diff --git a/src/testbed/gnunet-daemon-testbed-blacklist.c b/src/testbed/gnunet-daemon-testbed-blacklist.c
index 0cb83aacf..f2f96ee09 100644
--- a/src/testbed/gnunet-daemon-testbed-blacklist.c
+++ b/src/testbed/gnunet-daemon-testbed-blacklist.c
@@ -211,14 +211,13 @@ run (void *cls,
211 GNUNET_asprintf (&fname, 211 GNUNET_asprintf (&fname,
212 "%s/blacklist", 212 "%s/blacklist",
213 shome); 213 shome);
214 GNUNET_free (fname);
215 if (GNUNET_YES == GNUNET_DISK_file_test (fname)) 214 if (GNUNET_YES == GNUNET_DISK_file_test (fname))
216 { 215 {
217 mode = ACCESS_DENY; 216 mode = ACCESS_DENY;
218 setup_ac (shome, c); 217 setup_ac (shome, c);
219 } 218 }
220 GNUNET_free (shome); 219 GNUNET_free (shome);
221 return; 220 GNUNET_free (fname);
222} 221}
223 222
224 223
diff --git a/src/util/test_container_multihashmap.c b/src/util/test_container_multihashmap.c
index bd193324c..a0ef8aa36 100644
--- a/src/util/test_container_multihashmap.c
+++ b/src/util/test_container_multihashmap.c
@@ -27,7 +27,7 @@
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
29 29
30#define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (m != NULL) GNUNET_CONTAINER_multihashmap_destroy(m); return 1; } 30#define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (m != NULL) GNUNET_CONTAINER_multihashmap_destroy(m); if (NULL != iter) GNUNET_CONTAINER_multihashmap_iterator_destroy (iter); return 1; }
31#define CHECK(c) { if (! (c)) ABORT(); } 31#define CHECK(c) { if (! (c)) ABORT(); }
32 32
33static int 33static int
@@ -36,7 +36,7 @@ testMap (int i)
36 struct GNUNET_CONTAINER_MultiHashMap *m; 36 struct GNUNET_CONTAINER_MultiHashMap *m;
37 struct GNUNET_HashCode k1; 37 struct GNUNET_HashCode k1;
38 struct GNUNET_HashCode k2; 38 struct GNUNET_HashCode k2;
39 struct GNUNET_CONTAINER_MultiHashMapIterator *iter; 39 struct GNUNET_CONTAINER_MultiHashMapIterator *iter = NULL;
40 struct GNUNET_HashCode key_ret; 40 struct GNUNET_HashCode key_ret;
41 const char *ret; 41 const char *ret;
42 int j; 42 int j;
@@ -97,7 +97,7 @@ testMap (int i)
97 for (j = 0; j < GNUNET_CONTAINER_multihashmap_size (m); j++) 97 for (j = 0; j < GNUNET_CONTAINER_multihashmap_size (m); j++)
98 CHECK (GNUNET_YES == GNUNET_CONTAINER_multihashmap_iterator_next (iter, NULL, NULL)); 98 CHECK (GNUNET_YES == GNUNET_CONTAINER_multihashmap_iterator_next (iter, NULL, NULL));
99 CHECK (GNUNET_NO == GNUNET_CONTAINER_multihashmap_iterator_next (iter, NULL, NULL)); 99 CHECK (GNUNET_NO == GNUNET_CONTAINER_multihashmap_iterator_next (iter, NULL, NULL));
100 GNUNET_free (iter); 100 GNUNET_CONTAINER_multihashmap_iterator_destroy (iter);
101 101
102 GNUNET_CONTAINER_multihashmap_destroy (m); 102 GNUNET_CONTAINER_multihashmap_destroy (m);
103 return 0; 103 return 0;
diff --git a/src/util/test_container_multipeermap.c b/src/util/test_container_multipeermap.c
index f121281fa..65bed6606 100644
--- a/src/util/test_container_multipeermap.c
+++ b/src/util/test_container_multipeermap.c
@@ -27,7 +27,7 @@
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
29 29
30#define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (NULL != m) GNUNET_CONTAINER_multipeermap_destroy(m); return 1; } 30#define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (NULL != m) GNUNET_CONTAINER_multipeermap_destroy(m); if (NULL != iter) GNUNET_CONTAINER_multipeermap_iterator_destroy (iter); return 1; }
31#define CHECK(c) { if (! (c)) ABORT(); } 31#define CHECK(c) { if (! (c)) ABORT(); }
32 32
33static int 33static int
@@ -36,7 +36,7 @@ testMap (int i)
36 struct GNUNET_CONTAINER_MultiPeerMap *m; 36 struct GNUNET_CONTAINER_MultiPeerMap *m;
37 struct GNUNET_PeerIdentity k1; 37 struct GNUNET_PeerIdentity k1;
38 struct GNUNET_PeerIdentity k2; 38 struct GNUNET_PeerIdentity k2;
39 struct GNUNET_CONTAINER_MultiPeerMapIterator *iter; 39 struct GNUNET_CONTAINER_MultiPeerMapIterator *iter = NULL;
40 struct GNUNET_PeerIdentity key_ret; 40 struct GNUNET_PeerIdentity key_ret;
41 const char *ret; 41 const char *ret;
42 int j; 42 int j;
@@ -97,7 +97,7 @@ testMap (int i)
97 for (j = 0; j < GNUNET_CONTAINER_multipeermap_size (m); j++) 97 for (j = 0; j < GNUNET_CONTAINER_multipeermap_size (m); j++)
98 CHECK (GNUNET_YES == GNUNET_CONTAINER_multipeermap_iterator_next (iter, NULL, NULL)); 98 CHECK (GNUNET_YES == GNUNET_CONTAINER_multipeermap_iterator_next (iter, NULL, NULL));
99 CHECK (GNUNET_NO == GNUNET_CONTAINER_multipeermap_iterator_next (iter, NULL, NULL)); 99 CHECK (GNUNET_NO == GNUNET_CONTAINER_multipeermap_iterator_next (iter, NULL, NULL));
100 GNUNET_free (iter); 100 GNUNET_CONTAINER_multipeermap_iterator_destroy (iter);
101 101
102 GNUNET_CONTAINER_multipeermap_destroy (m); 102 GNUNET_CONTAINER_multipeermap_destroy (m);
103 return 0; 103 return 0;