diff options
author | Julius Bünger <buenger@mytum.de> | 2016-09-14 21:43:52 +0000 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2016-09-14 21:43:52 +0000 |
commit | 61f5774fa9b6694ae8760926497a60242b74ffdd (patch) | |
tree | 7541ae33e071e5b4461b3101168eeccb004780ca /src/rps | |
parent | 02ccdcf0ef5c039224a397f057b2a76f54364d92 (diff) | |
download | gnunet-61f5774fa9b6694ae8760926497a60242b74ffdd.tar.gz gnunet-61f5774fa9b6694ae8760926497a60242b74ffdd.zip |
-rps test: try to close file in case of failure
Diffstat (limited to 'src/rps')
-rw-r--r-- | src/rps/test_rps.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c index 629b73d44..4b4dfc8ba 100644 --- a/src/rps/test_rps.c +++ b/src/rps/test_rps.c | |||
@@ -399,12 +399,19 @@ tofile_ (const char *file_name, const char *line) | |||
399 | "Unable to write to file! (Size: %lu, size2: %lu)\n", | 399 | "Unable to write to file! (Size: %lu, size2: %lu)\n", |
400 | size, | 400 | size, |
401 | size2); | 401 | size2); |
402 | if (GNUNET_YES != GNUNET_DISK_file_close (f)) | ||
403 | { | ||
404 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
405 | "Unable to close file\n"); | ||
406 | } | ||
402 | return; | 407 | return; |
403 | } | 408 | } |
404 | 409 | ||
405 | if (GNUNET_YES != GNUNET_DISK_file_close (f)) | 410 | if (GNUNET_YES != GNUNET_DISK_file_close (f)) |
411 | { | ||
406 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 412 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
407 | "Unable to close file\n"); | 413 | "Unable to close file\n"); |
414 | } | ||
408 | } | 415 | } |
409 | 416 | ||
410 | /** | 417 | /** |