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:
Max 2017-02-20 11:06:12 +01:00
parent 00b3715723
commit 58d4a84a31
1 changed files with 1 additions and 1 deletions

View File

@ -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");