[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/04: check unlink() return value in test
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/04: check unlink() return value in test |
Date: |
Mon, 13 Mar 2017 18:11:04 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit d012e0579a2819ce68ab14fc986a8c999fb05e60
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Mar 13 18:07:59 2017 +0100
check unlink() return value in test
---
src/sq/test_sq.c | 14 +++++++++-----
1 file 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,
fprintf (stderr,
"Failed to create table\n");
sqlite3_close (dbh);
- unlink ("test.db");
+ if (0 != unlink ("test.db"))
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "unlink",
+ "test.db");
return 1;
}
@@ -266,12 +269,13 @@ main(int argc,
{
fprintf (stderr,
"Failed to drop table\n");
- sqlite3_close (dbh);
- unlink ("test.db");
- return 1;
+ ret = 1;
}
sqlite3_close (dbh);
- unlink ("test.db");
+ if (0 != unlink ("test.db"))
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "unlink",
+ "test.db");
return ret;
}
--
To stop receiving notification emails like this one, please contact
address@hidden