aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-02-20 11:06:12 +0100
committerMax <msuraev@sysmocom.de>2017-02-20 13:38:26 +0100
commit58d4a84a3198bc6c30f5fc9f2182ec2de5deb446 (patch)
tree4c778570f7d6732610b1139a8e2184d8a7457441
parent00b37157231b98cfb9e940c0f488320f42d3eca8 (diff)
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
-rw-r--r--src/db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db.c b/src/db.c
index 92983f9..d20b8b6 100644
--- a/src/db.c
+++ b/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");