diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-25 21:42:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-25 21:42:11 +0000 |
commit | 78ad97319349e9881653684f276dd620a0a423e9 (patch) | |
tree | cded8f0063f6848429706a36bd51174e62417b7e /src/fs | |
parent | b968c5926b205c3cdd467474753746ef21522b32 (diff) | |
download | gnunet-78ad97319349e9881653684f276dd620a0a423e9.tar.gz gnunet-78ad97319349e9881653684f276dd620a0a423e9.zip |
-misc fixes based on cppcheck
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs_test_lib.c | 10 | ||||
-rw-r--r-- | src/fs/gnunet-daemon-fsprofiler.c | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/fs/fs_test_lib.c b/src/fs/fs_test_lib.c index 758220f5f..0fc36e7ac 100644 --- a/src/fs/fs_test_lib.c +++ b/src/fs/fs_test_lib.c | |||
@@ -217,10 +217,7 @@ publish_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
217 | po->publish_timeout_task = GNUNET_SCHEDULER_NO_TASK; | 217 | po->publish_timeout_task = GNUNET_SCHEDULER_NO_TASK; |
218 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 218 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
219 | "Timeout while trying to publish data\n"); | 219 | "Timeout while trying to publish data\n"); |
220 | if (NULL == po->fs) | 220 | GNUNET_TESTBED_operation_done (po->fs_op); |
221 | GNUNET_TESTBED_operation_done (po->fs_op); | ||
222 | else | ||
223 | GNUNET_TESTBED_operation_done (po->fs_op); | ||
224 | GNUNET_FS_publish_stop (po->publish_context); | 221 | GNUNET_FS_publish_stop (po->publish_context); |
225 | po->publish_cont (po->publish_cont_cls, NULL, NULL); | 222 | po->publish_cont (po->publish_cont_cls, NULL, NULL); |
226 | (void) GNUNET_DISK_directory_remove (po->publish_tmp_file); | 223 | (void) GNUNET_DISK_directory_remove (po->publish_tmp_file); |
@@ -492,10 +489,7 @@ download_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
492 | GNUNET_SCHEDULER_add_continuation (dop->download_cont, | 489 | GNUNET_SCHEDULER_add_continuation (dop->download_cont, |
493 | dop->download_cont_cls, | 490 | dop->download_cont_cls, |
494 | GNUNET_SCHEDULER_REASON_TIMEOUT); | 491 | GNUNET_SCHEDULER_REASON_TIMEOUT); |
495 | if (NULL == dop->fs) | 492 | GNUNET_TESTBED_operation_done (dop->fs_op); |
496 | GNUNET_TESTBED_operation_done (dop->fs_op); | ||
497 | else | ||
498 | GNUNET_TESTBED_operation_done (dop->fs_op); | ||
499 | GNUNET_FS_uri_destroy (dop->uri); | 493 | GNUNET_FS_uri_destroy (dop->uri); |
500 | GNUNET_free (dop); | 494 | GNUNET_free (dop); |
501 | } | 495 | } |
diff --git a/src/fs/gnunet-daemon-fsprofiler.c b/src/fs/gnunet-daemon-fsprofiler.c index 30a127559..a19fa1ef6 100644 --- a/src/fs/gnunet-daemon-fsprofiler.c +++ b/src/fs/gnunet-daemon-fsprofiler.c | |||
@@ -186,7 +186,7 @@ parse_pattern (struct Pattern **head, | |||
186 | "(%llu,%llu,%llu)", | 186 | "(%llu,%llu,%llu)", |
187 | &x, &y, &t)) | 187 | &x, &y, &t)) |
188 | { | 188 | { |
189 | p = GNUNET_malloc (sizeof (struct Pattern)); | 189 | p = GNUNET_new (struct Pattern); |
190 | p->x = x; | 190 | p->x = x; |
191 | p->y = y; | 191 | p->y = y; |
192 | p->delay.rel_value_us = (uint64_t) t; | 192 | p->delay.rel_value_us = (uint64_t) t; |