fixing cosmetics and inlining of configurations
authorChristian Grothoff <christian@grothoff.org>
Sun, 22 Nov 2009 20:54:12 +0000 (20:54 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 22 Nov 2009 20:54:12 +0000 (20:54 +0000)
src/util/configuration.c
src/util/disk.c
src/util/test_configuration.c
src/util/test_disk.c
src/util/test_pseudonym.c

index 0d056bf33c1fada05e4c3fe9f0b95158d8c27d27..41eeeb461049444990da4902ccc2cc374b1e0551 100644 (file)
@@ -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);
index 79b1b64a81722a1aeea0d7c1086cd2b1c29e8083..6512d9945f6e542b876635144a6051789d711e55 100644 (file)
@@ -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;
 }
 
index 9ddd7b3e67f8044c15d5b8b1da15a47490570237..7c17ecf21a8ca5ae999a667c950f68899bd6261b 100644 (file)
@@ -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;
index c84ec812ac287c1b8162a9f0ada4c2900d746eb2..f06ffacaf02647cadafc0c092875d40a6b13f033 100644 (file)
@@ -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;
 }
 
index bdac7d90d16e5484d8ab3c545300c42761c37796..31e722574bc2eb659078371f46238ade2bcf79bf 100644 (file)
@@ -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 (&noti_callback, &notiCount);
   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;
 }