diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-13 18:07:59 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-13 18:07:59 +0100 |
commit | d012e0579a2819ce68ab14fc986a8c999fb05e60 (patch) | |
tree | 48412f0193e7c5e1135b2756a8d7c4bfe63609b4 /src/sq | |
parent | ca097ea471280b52d48e8818ec12156af78f32b8 (diff) | |
download | gnunet-d012e0579a2819ce68ab14fc986a8c999fb05e60.tar.gz gnunet-d012e0579a2819ce68ab14fc986a8c999fb05e60.zip |
check unlink() return value in test
Diffstat (limited to 'src/sq')
-rw-r--r-- | src/sq/test_sq.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/sq/test_sq.c b/src/sq/test_sq.c index e6896861e..42c321666 100644 --- a/src/sq/test_sq.c +++ b/src/sq/test_sq.c | |||
@@ -254,7 +254,10 @@ main(int argc, | |||
254 | fprintf (stderr, | 254 | fprintf (stderr, |
255 | "Failed to create table\n"); | 255 | "Failed to create table\n"); |
256 | sqlite3_close (dbh); | 256 | sqlite3_close (dbh); |
257 | unlink ("test.db"); | 257 | if (0 != unlink ("test.db")) |
258 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, | ||
259 | "unlink", | ||
260 | "test.db"); | ||
258 | return 1; | 261 | return 1; |
259 | } | 262 | } |
260 | 263 | ||
@@ -266,12 +269,13 @@ main(int argc, | |||
266 | { | 269 | { |
267 | fprintf (stderr, | 270 | fprintf (stderr, |
268 | "Failed to drop table\n"); | 271 | "Failed to drop table\n"); |
269 | sqlite3_close (dbh); | 272 | ret = 1; |
270 | unlink ("test.db"); | ||
271 | return 1; | ||
272 | } | 273 | } |
273 | sqlite3_close (dbh); | 274 | sqlite3_close (dbh); |
274 | unlink ("test.db"); | 275 | if (0 != unlink ("test.db")) |
276 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, | ||
277 | "unlink", | ||
278 | "test.db"); | ||
275 | return ret; | 279 | return ret; |
276 | } | 280 | } |
277 | 281 | ||