diff options
author | Julius Bünger <buenger@mytum.de> | 2015-06-10 11:01:46 +0000 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2015-06-10 11:01:46 +0000 |
commit | 11ca82f4300e03a0fd82e1507b3f1fc9aefbbabd (patch) | |
tree | 1578b63dfc3c429208d686efd4e3ec8331255d71 /src/rps/rps-test_util.c | |
parent | 83da6bcc7751ee11905e3f8f3adcfe33d2b926bc (diff) | |
download | gnunet-11ca82f4300e03a0fd82e1507b3f1fc9aefbbabd.tar.gz gnunet-11ca82f4300e03a0fd82e1507b3f1fc9aefbbabd.zip |
-fix coverity
Diffstat (limited to 'src/rps/rps-test_util.c')
-rw-r--r-- | src/rps/rps-test_util.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/rps/rps-test_util.c b/src/rps/rps-test_util.c index a3354b0ac..5ba477bb7 100644 --- a/src/rps/rps-test_util.c +++ b/src/rps/rps-test_util.c | |||
@@ -82,6 +82,11 @@ to_file_ (char *file_name, char *line) | |||
82 | "Unable to write to file! (Size: %u, size2: %u)\n", | 82 | "Unable to write to file! (Size: %u, size2: %u)\n", |
83 | size, | 83 | size, |
84 | size2); | 84 | size2); |
85 | |||
86 | if (GNUNET_YES != GNUNET_DISK_file_close (f)) | ||
87 | LOG (GNUNET_ERROR_TYPE_WARNING, | ||
88 | "Unable to close file\n"); | ||
89 | |||
85 | return; | 90 | return; |
86 | } | 91 | } |
87 | 92 | ||
@@ -149,9 +154,12 @@ create_file (const char *name) | |||
149 | if (0 > size) | 154 | if (0 > size) |
150 | LOG (GNUNET_ERROR_TYPE_WARNING, "Failed to create name_buf\n"); | 155 | LOG (GNUNET_ERROR_TYPE_WARNING, "Failed to create name_buf\n"); |
151 | 156 | ||
152 | GNUNET_DISK_directory_create (prefix); | 157 | if (GNUNET_YES != GNUNET_DISK_directory_create (prefix)) |
153 | 158 | { | |
154 | file_name = GNUNET_malloc (strlen (name_buf) + 6); | 159 | LOG (GNUNET_ERROR_TYPE_WARNING, |
160 | "Could not create directory %s.\n", | ||
161 | prefix); | ||
162 | } | ||
155 | 163 | ||
156 | if (NULL == (file_name = GNUNET_DISK_mktemp (name_buf))) | 164 | if (NULL == (file_name = GNUNET_DISK_mktemp (name_buf))) |
157 | LOG (GNUNET_ERROR_TYPE_WARNING, "Could not create file\n"); | 165 | LOG (GNUNET_ERROR_TYPE_WARNING, "Could not create file\n"); |