Fix compiler's warning about printf security
Also, fix log formatting: SQL statements do not have '\n' at the end. Note: sqlite should be compiled with SQLITE_ENABLE_SQLLOG for this code to work at all. Change-Id: I5e53de54ad1b9da18e1f414932cfd21be71ab154
This commit is contained in:
parent
00b3715723
commit
58d4a84a31
2
src/db.c
2
src/db.c
|
@ -47,7 +47,7 @@ static void sql3_sql_log_cb(void *arg, sqlite3 *s3, const char *stmt, int type)
|
|||
LOGP(DDB, LOGL_DEBUG, "Opened database\n");
|
||||
break;
|
||||
case 1:
|
||||
LOGP(DDB, LOGL_DEBUG, stmt);
|
||||
LOGP(DDB, LOGL_DEBUG, "%s\n", stmt);
|
||||
break;
|
||||
case 2:
|
||||
LOGP(DDB, LOGL_DEBUG, "Closed database\n");
|
||||
|
|
Loading…
Reference in New Issue