From: Christian Grothoff Date: Mon, 30 Aug 2010 21:32:26 +0000 (+0000) Subject: fixes X-Git-Tag: initial-import-from-subversion-38251~20507 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ffa0156860c584608db5bde1038e127c6e8fda21;p=oweals%2Fgnunet.git fixes --- diff --git a/src/util/test_configuration.c b/src/util/test_configuration.c index 6747c73cb..fd2b91bfb 100644 --- a/src/util/test_configuration.c +++ b/src/util/test_configuration.c @@ -492,15 +492,22 @@ main (int argc, char *argv[]) GNUNET_CONFIGURATION_destroy (cfg); return 1; } - if ((GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (cfg, "TESTING", "WEAKRANDOM", - &c)) - || (0 != strcmp (c, "YES"))) + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, "TESTING", "WEAKRANDOM", + &c)) + { + GNUNET_break (0); + GNUNET_CONFIGURATION_destroy (cfg); + return 1; + } + if (0 != strcmp (c, "YES")) { GNUNET_break (0); + GNUNET_free (c); GNUNET_CONFIGURATION_destroy (cfg); return 1; } + GNUNET_free (c); GNUNET_CONFIGURATION_destroy (cfg); diff --git a/src/util/test_container_slist.c b/src/util/test_container_slist.c index ab19eb638..a9523c9d2 100644 --- a/src/util/test_container_slist.c +++ b/src/util/test_container_slist.c @@ -28,8 +28,7 @@ #include "gnunet_common.h" #include "gnunet_container_lib.h" -#define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); return 1; } -#define CHECK(c) { if (! (c)) ABORT(); } +#define CHECK(c) do { if (! (c)) { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); GNUNET_CONTAINER_slist_destroy (l); return 1; } } while (0) int main (int argc, char *argv[])