return 1;
}
failureCount += testConfig ();
- failureCount += 2 * testConfigFilenames ();
+ if (failureCount > 0)
+ goto error;
+
+ failureCount = testConfigFilenames ();
+ if (failureCount > 0)
+ goto error;
if (GNUNET_OK != GNUNET_CONFIGURATION_write (cfg, "/tmp/gnunet-test.conf"))
{
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);
GNUNET_CONFIGURATION_destroy (cfgDefault);
+error:
if (failureCount != 0)
{
fprintf (stderr, "Test failed: %u\n", failureCount);