diff mbox

[RFC,1/2] nfsdcltrack: use sqlite3_close instead of sqlite3_close_v2

Message ID 1416249135-18736-2-git-send-email-jlayton@primarydata.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton Nov. 17, 2014, 6:32 p.m. UTC
sqlite3_close_v2 wasn't added until v3.7.14 of libsqlite3 so this causes
the build to fail vs. very old sqlite3 libs. Also, Chuck points out that
the documentation says that sqlite3_close_v2 is intended for use with
host languages that are garbage collected, and C isn't.

In practice, we shouldn't ever see sqlite3_close return SQLITE_BUSY here
anyway since the program is single-threaded, so sqlite3_close should be
fine.

Signed-off-by: Jeff Layton <jlayton@primarydata.com>
---
 utils/nfsdcltrack/sqlite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c
index fb45c4af5edb..7cac89ef459f 100644
--- a/utils/nfsdcltrack/sqlite.c
+++ b/utils/nfsdcltrack/sqlite.c
@@ -357,7 +357,7 @@  sqlite_prepare_dbh(const char *topdir)
 
 	return ret;
 out_close:
-	sqlite3_close_v2(dbh);
+	sqlite3_close(dbh);
 	dbh = NULL;
 	return ret;
 }