Update plibc header
[oweals/gnunet.git] / src / util / test_configuration.c
index b1a446f86c4406c82289818ba5aea8d43b4d4c5f..e68740e7f60ba221acd41f91b2b0897b68b32ee5 100644 (file)
  */
 
 #include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_configuration_lib.h"
-#include "gnunet_disk_lib.h"
+#include "gnunet_util_lib.h"
 
-#define DEBUG GNUNET_EXTRA_LOGGING
 
 /* Test Configuration Diffs Options */
 enum
@@ -40,10 +37,8 @@ enum
   ADD_NEW_ENTRY,
   REMOVE_SECTION,
   REMOVE_ENTRY,
-  COMPARE
-#if DEBUG
-      , PRINT
-#endif
+  COMPARE,
+  PRINT
 };
 
 static struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -234,20 +229,21 @@ checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfgDefault, int option)
   /* Compare the dumped configuration with modifications done */
   cfg = GNUNET_CONFIGURATION_create ();
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_parse (cfg, diffsFileName));
-  remove (diffsFileName);
+  if (0 != remove (diffsFileName))
+    GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "remove", diffsFileName);
   cbData.callBackOption = COMPARE;
   cbData.cfgDiffs = cfgDiffs;
   GNUNET_CONFIGURATION_iterate (cfg, diffsCallBack, &cbData);
   if (1 == (ret = cbData.status))
   {
-    FPRINTF (stderr, "%s", 
+    FPRINTF (stderr, "%s",
              "Incorrect Configuration Diffs: Diffs may contain data not actually edited\n");
     goto housekeeping;
   }
   cbData.cfgDiffs = cfg;
   GNUNET_CONFIGURATION_iterate (cfgDiffs, diffsCallBack, &cbData);
   if ((ret = cbData.status) == 1)
-    FPRINTF (stderr, "%s", 
+    FPRINTF (stderr, "%s",
              "Incorrect Configuration Diffs: Data may be missing in diffs\n");
 
 housekeeping: