aboutsummaryrefslogtreecommitdiff
path: root/src/regex/test_regex_graph_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex/test_regex_graph_api.c')
-rw-r--r--src/regex/test_regex_graph_api.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/regex/test_regex_graph_api.c b/src/regex/test_regex_graph_api.c
index 9e8e1fb165..b20a6d07f3 100644
--- a/src/regex/test_regex_graph_api.c
+++ b/src/regex/test_regex_graph_api.c
@@ -48,7 +48,7 @@ filecheck (const char *filename)
if (NULL == fp)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not find graph %s\n", filename);
- error++;
+ return ++error;
}
fseek (fp, 0L, SEEK_END);
@@ -62,7 +62,14 @@ filecheck (const char *filename)
error += fclose (fp);
if (!KEEP_FILES)
- unlink (filename);
+ {
+ if (0 != unlink (filename))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not remove temp files (%s)\n",
+ filename);
+ }
+ }
+
return error;
}