From b2f6f5101353834f8d03a20b0e804e2882a96207 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 22 Nov 2009 20:54:12 +0000 Subject: [PATCH] fixing cosmetics and inlining of configurations --- src/util/configuration.c | 4 ++-- src/util/disk.c | 2 +- src/util/test_configuration.c | 2 +- src/util/test_disk.c | 2 +- src/util/test_pseudonym.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/configuration.c b/src/util/configuration.c index 0d056bf33..41eeeb461 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c @@ -209,7 +209,7 @@ GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg, if (1 == sscanf (line, "@INLINE@ %191[^\n]", value)) { /* @INLINE@ value */ - if (0 != GNUNET_CONFIGURATION_parse (cfg, value)) + if (GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, value)) ret = GNUNET_SYSERR; /* failed to parse included config */ } else if (1 == sscanf (line, "[%99[^]]]", value)) @@ -1140,7 +1140,7 @@ GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg, (!((filename == NULL) || (GNUNET_OK == GNUNET_CONFIGURATION_parse (cfg, filename))))) { - GNUNET_free (baseconfig); + GNUNET_free (baseconfig); return GNUNET_SYSERR; } GNUNET_free (baseconfig); diff --git a/src/util/disk.c b/src/util/disk.c index 79b1b64a8..6512d9945 100644 --- a/src/util/disk.c +++ b/src/util/disk.c @@ -911,7 +911,7 @@ GNUNET_DISK_directory_iterator_start (struct GNUNET_SCHEDULER_Handle *sched, static int remove_helper (void *unused, const char *fn) { - GNUNET_DISK_directory_remove (fn); + (void) GNUNET_DISK_directory_remove (fn); return GNUNET_OK; } diff --git a/src/util/test_configuration.c b/src/util/test_configuration.c index 9ddd7b3e6..7c17ecf21 100644 --- a/src/util/test_configuration.c +++ b/src/util/test_configuration.c @@ -231,7 +231,7 @@ checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfgDefault, int option) /* Compare the dumped configuration with modifications done */ cfg = GNUNET_CONFIGURATION_create (); - GNUNET_CONFIGURATION_parse (cfg, diffsFileName); + GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_parse (cfg, diffsFileName)); remove (diffsFileName); cbData.callBackOption = COMPARE; cbData.cfgDiffs = cfgDiffs; diff --git a/src/util/test_disk.c b/src/util/test_disk.c index c84ec812a..f06ffacaf 100644 --- a/src/util/test_disk.c +++ b/src/util/test_disk.c @@ -211,7 +211,7 @@ testGetHome () GNUNET_CONFIGURATION_destroy (cfg); ret = strcmp ("/tmp/test-gnunet-disk-a/b/c/d/e", fn); GNUNET_free (fn); - GNUNET_DISK_directory_remove ("/tmp/test-gnunet-disk-a"); + GNUNET_break (GNUNET_OK == GNUNET_DISK_directory_remove ("/tmp/test-gnunet-disk-a")); return ret; } diff --git a/src/util/test_pseudonym.c b/src/util/test_pseudonym.c index bdac7d90d..31e722574 100644 --- a/src/util/test_pseudonym.c +++ b/src/util/test_pseudonym.c @@ -111,7 +111,7 @@ main (int argc, char *argv[]) GNUNET_log_setup ("test-pseudonym", "WARNING", NULL); ok = GNUNET_YES; GNUNET_CRYPTO_random_disable_entropy_gathering (); - GNUNET_DISK_directory_remove ("/tmp/gnunet-pseudonym-test"); + (void) GNUNET_DISK_directory_remove ("/tmp/gnunet-pseudonym-test"); cfg = GNUNET_CONFIGURATION_create (); if (-1 == GNUNET_CONFIGURATION_parse (cfg, "test_pseudonym_data.conf")) { @@ -180,7 +180,7 @@ FAILURE: GNUNET_PSEUDONYM_discovery_callback_unregister (¬i_callback, ¬iCount); GNUNET_CONTAINER_meta_data_destroy (meta); GNUNET_CONFIGURATION_destroy (cfg); - GNUNET_DISK_directory_remove ("/tmp/gnunet-pseudonym-test"); + GNUNET_break (GNUNET_OK == GNUNET_DISK_directory_remove ("/tmp/gnunet-pseudonym-test")); return (ok == GNUNET_YES) ? 0 : 1; } -- 2.25.1