[MERGED] osmo-hlr[master]: Fix compiler's warning about printf security

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Mon Feb 20 15:35:19 UTC 2017


Max has submitted this change and it was merged.

Change subject: Fix compiler's warning about printf security
......................................................................


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
---
M src/db.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



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

-- 
To view, visit https://gerrit.osmocom.org/1851
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e53de54ad1b9da18e1f414932cfd21be71ab154
Gerrit-PatchSet: 4
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list