diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-09-09 11:18:53 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-09-09 11:18:53 +0000 |
commit | 355641eae5d8f883d387d2dd4283200f91402a6a (patch) | |
tree | 68af3f38c02ca90dff050a771aa96ccba2a4940c /src/experimentation | |
parent | a1d89c2e90376f4e806aa9a2850dc87b37d10ddd (diff) | |
download | gnunet-355641eae5d8f883d387d2dd4283200f91402a6a.tar.gz gnunet-355641eae5d8f883d387d2dd4283200f91402a6a.zip |
checks for coverity
Diffstat (limited to 'src/experimentation')
-rw-r--r-- | src/experimentation/gnunet-daemon-experimentation_experiments.c | 9 | ||||
-rw-r--r-- | src/experimentation/gnunet-daemon-experimentation_nodes.c | 10 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/experimentation/gnunet-daemon-experimentation_experiments.c b/src/experimentation/gnunet-daemon-experimentation_experiments.c index 891865b39..01d8fa816 100644 --- a/src/experimentation/gnunet-daemon-experimentation_experiments.c +++ b/src/experimentation/gnunet-daemon-experimentation_experiments.c | |||
@@ -86,7 +86,7 @@ int free_experiment (void *cls, | |||
86 | void *value) | 86 | void *value) |
87 | { | 87 | { |
88 | struct Experiment *e = value; | 88 | struct Experiment *e = value; |
89 | GNUNET_CONTAINER_multihashmap_remove (experiments, key, value); | 89 | GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (experiments, key, value)); |
90 | GNUNET_free_non_null (e->description); | 90 | GNUNET_free_non_null (e->description); |
91 | GNUNET_free_non_null (e->name); | 91 | GNUNET_free_non_null (e->name); |
92 | GNUNET_free (e); | 92 | GNUNET_free (e); |
@@ -107,7 +107,7 @@ int free_issuer (void *cls, | |||
107 | void *value) | 107 | void *value) |
108 | { | 108 | { |
109 | struct Issuer *i = value; | 109 | struct Issuer *i = value; |
110 | GNUNET_CONTAINER_multihashmap_remove (valid_issuers, key, value); | 110 | GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (valid_issuers, key, value)); |
111 | GNUNET_free (i); | 111 | GNUNET_free (i); |
112 | return GNUNET_OK; | 112 | return GNUNET_OK; |
113 | } | 113 | } |
@@ -354,9 +354,8 @@ void exp_file_iterator (void *cls, | |||
354 | /* Optional fields */ | 354 | /* Optional fields */ |
355 | 355 | ||
356 | /* Description */ | 356 | /* Description */ |
357 | GNUNET_CONFIGURATION_get_value_string (exp, name, "DESCRIPTION", &description); | 357 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (exp, name, "DESCRIPTION", &description)) |
358 | 358 | description = NULL; | |
359 | |||
360 | 359 | ||
361 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, "START", (long long unsigned int *) &start.abs_value_us)) | 360 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, "START", (long long unsigned int *) &start.abs_value_us)) |
362 | start = GNUNET_TIME_UNIT_ZERO_ABS; | 361 | start = GNUNET_TIME_UNIT_ZERO_ABS; |
diff --git a/src/experimentation/gnunet-daemon-experimentation_nodes.c b/src/experimentation/gnunet-daemon-experimentation_nodes.c index 14d25b6c9..a4da92d50 100644 --- a/src/experimentation/gnunet-daemon-experimentation_nodes.c +++ b/src/experimentation/gnunet-daemon-experimentation_nodes.c | |||
@@ -148,7 +148,7 @@ cleanup_node (void *cls, | |||
148 | 148 | ||
149 | GNUNET_free_non_null (n->issuer_id); | 149 | GNUNET_free_non_null (n->issuer_id); |
150 | 150 | ||
151 | GNUNET_CONTAINER_multihashmap_remove (cur, key, value); | 151 | GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (cur, key, value)); |
152 | GNUNET_free (value); | 152 | GNUNET_free (value); |
153 | return GNUNET_OK; | 153 | return GNUNET_OK; |
154 | } | 154 | } |
@@ -242,7 +242,7 @@ remove_request (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
242 | 242 | ||
243 | if (GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains (nodes_requested, &n->id.hashPubKey)) | 243 | if (GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains (nodes_requested, &n->id.hashPubKey)) |
244 | { | 244 | { |
245 | GNUNET_CONTAINER_multihashmap_remove (nodes_requested, &n->id.hashPubKey, n); | 245 | GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (nodes_requested, &n->id.hashPubKey, n)); |
246 | update_stats (nodes_requested); | 246 | update_stats (nodes_requested); |
247 | GNUNET_CONTAINER_multihashmap_put (nodes_inactive, &n->id.hashPubKey, n, | 247 | GNUNET_CONTAINER_multihashmap_put (nodes_inactive, &n->id.hashPubKey, n, |
248 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); | 248 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); |
@@ -268,7 +268,7 @@ size_t send_experimentation_request_cb (void *cls, size_t bufsize, void *buf) | |||
268 | size_t ri_size = sizeof (struct Experimentation_Issuer) * GSE_my_issuer_count; | 268 | size_t ri_size = sizeof (struct Experimentation_Issuer) * GSE_my_issuer_count; |
269 | size_t total_size = msg_size + ri_size; | 269 | size_t total_size = msg_size + ri_size; |
270 | 270 | ||
271 | memset (buf, '0', bufsize); | 271 | memset (buf, '\0', bufsize); |
272 | n->cth = NULL; | 272 | n->cth = NULL; |
273 | if (buf == NULL) | 273 | if (buf == NULL) |
274 | { | 274 | { |
@@ -479,7 +479,7 @@ static void handle_request (const struct GNUNET_PeerIdentity *peer, | |||
479 | } | 479 | } |
480 | else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_inactive, &peer->hashPubKey))) | 480 | else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_inactive, &peer->hashPubKey))) |
481 | { | 481 | { |
482 | GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n); | 482 | GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n)); |
483 | update_stats (nodes_inactive); | 483 | update_stats (nodes_inactive); |
484 | make_active = GNUNET_YES; | 484 | make_active = GNUNET_YES; |
485 | } | 485 | } |
@@ -586,7 +586,7 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer, | |||
586 | { | 586 | { |
587 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from peer `%s'\n", | 587 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from peer `%s'\n", |
588 | "RESPONSE", "inactive", GNUNET_i2s (peer)); | 588 | "RESPONSE", "inactive", GNUNET_i2s (peer)); |
589 | GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n); | 589 | GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n)); |
590 | update_stats (nodes_inactive); | 590 | update_stats (nodes_inactive); |
591 | make_active = GNUNET_YES; | 591 | make_active = GNUNET_YES; |
592 | } | 592 | } |