Change in osmo-hlr[master]: add whitespace around PRId64 constants

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Dec 7 17:13:17 UTC 2018


Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/12206 )

Change subject: add whitespace around PRId64 constants
......................................................................

add whitespace around PRId64 constants

Avoid string concatenations without interleaving whitespace.
Some compilers don't like "foo""bar", they only like "foo" "bar".

Requested by: Pau
https://gerrit.osmocom.org/c/osmo-hlr/+/12121/5/src/db_hlr.c#637

Change-Id: Ic7a81114f9afbefcbd62d434720854cfdd4a2dd9
---
M src/ctrl.c
M src/db_auc.c
M src/db_hlr.c
M src/hlr_db_tool.c
4 files changed, 17 insertions(+), 17 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/src/ctrl.c b/src/ctrl.c
index 8ae9d7c..05a0107 100644
--- a/src/ctrl.c
+++ b/src/ctrl.c
@@ -132,7 +132,7 @@
 			      struct hlr_subscriber *subscr)
 {
 	ctrl_cmd_reply_printf(cmd,
-		"\nid\t%"PRIu64
+		"\nid\t%" PRIu64
 		FMT_S
 		FMT_S
 		FMT_BOOL
@@ -189,7 +189,7 @@
 	ctrl_cmd_reply_printf(cmd,
 		"\naud3g.%s\t%s"
 		"\naud3g.ind_bitlen\t%u"
-		"\naud3g.sqn\t%"PRIu64
+		"\naud3g.sqn\t%" PRIu64
 		,
 		aud->u.umts.opc_is_op? "op" : "opc",
 		hexdump_buf(aud->u.umts.opc),
diff --git a/src/db_auc.c b/src/db_auc.c
index 5fb5e3a..e29b44b 100644
--- a/src/db_auc.c
+++ b/src/db_auc.c
@@ -49,7 +49,7 @@
 	/* execute the statement */
 	rc = sqlite3_step(stmt);
 	if (rc != SQLITE_DONE) {
-		LOGP(DAUC, LOGL_ERROR, "Cannot update SQN for subscriber ID=%"PRId64
+		LOGP(DAUC, LOGL_ERROR, "Cannot update SQN for subscriber ID=%" PRId64
 		     ": SQL error: (%d) %s\n",
 		     subscr_id, rc, sqlite3_errmsg(dbc->db));
 		ret = -EIO;
@@ -59,11 +59,11 @@
 	/* verify execution result */
 	rc = sqlite3_changes(dbc->db);
 	if (!rc) {
-		LOGP(DAUC, LOGL_ERROR, "Cannot update SQN for subscriber ID=%"PRId64
+		LOGP(DAUC, LOGL_ERROR, "Cannot update SQN for subscriber ID=%" PRId64
 		     ": no auc_3g entry for such subscriber\n", subscr_id);
 		ret = -ENOENT;
 	} else if (rc != 1) {
-		LOGP(DAUC, LOGL_ERROR, "Update SQN for subscriber ID=%"PRId64
+		LOGP(DAUC, LOGL_ERROR, "Update SQN for subscriber ID=%" PRId64
 		     ": SQL modified %d rows (expected 1)\n", subscr_id, rc);
 		ret = -EIO;
 	}
diff --git a/src/db_hlr.c b/src/db_hlr.c
index 342698e..db31009 100644
--- a/src/db_hlr.c
+++ b/src/db_hlr.c
@@ -93,7 +93,7 @@
 	rc = sqlite3_step(stmt);
 	if (rc != SQLITE_DONE) {
 		LOGP(DAUC, LOGL_ERROR,
-		       "Cannot delete subscriber ID=%"PRId64": SQL error: (%d) %s\n",
+		       "Cannot delete subscriber ID=%" PRId64 ": SQL error: (%d) %s\n",
 		       subscr_id, rc, sqlite3_errmsg(dbc->db));
 		db_remove_reset(stmt);
 		return -EIO;
@@ -102,11 +102,11 @@
 	/* verify execution result */
 	rc = sqlite3_changes(dbc->db);
 	if (!rc) {
-		LOGP(DAUC, LOGL_ERROR, "Cannot delete: no such subscriber: ID=%"PRId64"\n",
+		LOGP(DAUC, LOGL_ERROR, "Cannot delete: no such subscriber: ID=%" PRId64 "\n",
 		     subscr_id);
 		ret = -ENOENT;
 	} else if (rc != 1) {
-		LOGP(DAUC, LOGL_ERROR, "Delete subscriber ID=%"PRId64
+		LOGP(DAUC, LOGL_ERROR, "Delete subscriber ID=%" PRId64
 		     ": SQL modified %d rows (expected 1)\n", subscr_id, rc);
 		ret = -EIO;
 	}
@@ -316,7 +316,7 @@
 		 * empty, and no entry is not an error then.*/
 		ret = -ENOENT;
 	else if (rc != 1) {
-		LOGP(DAUC, LOGL_ERROR, "Delete subscriber ID=%"PRId64
+		LOGP(DAUC, LOGL_ERROR, "Delete subscriber ID=%" PRId64
 		     " from %s: SQL modified %d rows (expected 1)\n",
 		     subscr_id, label, rc);
 		ret = -EIO;
@@ -504,7 +504,7 @@
 
 	rc = db_sel(dbc, stmt, subscr, &err);
 	if (rc)
-		LOGP(DAUC, LOGL_ERROR, "Cannot read subscriber from db: ID=%"PRId64": %s\n",
+		LOGP(DAUC, LOGL_ERROR, "Cannot read subscriber from db: ID=%" PRId64 ": %s\n",
 		     id, err);
 	return rc;
 }
@@ -592,7 +592,7 @@
 	/* execute the statement */
 	rc = sqlite3_step(stmt);
 	if (rc != SQLITE_DONE) {
-		LOGP(DAUC, LOGL_ERROR, "Update %s number for subscriber ID=%"PRId64": SQL Error: %s\n",
+		LOGP(DAUC, LOGL_ERROR, "Update %s number for subscriber ID=%" PRId64 ": SQL Error: %s\n",
 		     is_ps? "SGSN" : "VLR", subscr_id, sqlite3_errmsg(dbc->db));
 		ret = -EIO;
 		goto out;
@@ -601,13 +601,13 @@
 	/* verify execution result */
 	rc = sqlite3_changes(dbc->db);
 	if (!rc) {
-		LOGP(DAUC, LOGL_ERROR, "Cannot update %s number for subscriber ID=%"PRId64
+		LOGP(DAUC, LOGL_ERROR, "Cannot update %s number for subscriber ID=%" PRId64
 		     ": no such subscriber\n",
 		     is_ps? "SGSN" : "VLR", subscr_id);
 		ret = -ENOENT;
 		goto out;
 	} else if (rc != 1) {
-		LOGP(DAUC, LOGL_ERROR, "Update %s number for subscriber ID=%"PRId64
+		LOGP(DAUC, LOGL_ERROR, "Update %s number for subscriber ID=%" PRId64
 		       ": SQL modified %d rows (expected 1)\n",
 		       is_ps? "SGSN" : "VLR", subscr_id, rc);
 		ret = -EIO;
@@ -635,7 +635,7 @@
 	rc = sqlite3_step(stmt);
 	if (rc != SQLITE_DONE) {
 		LOGP(DAUC, LOGL_ERROR,
-		       "Cannot update LU timestamp for subscriber ID=%"PRId64": SQL error: (%d) %s\n",
+		       "Cannot update LU timestamp for subscriber ID=%" PRId64 ": SQL error: (%d) %s\n",
 		       subscr_id, rc, sqlite3_errmsg(dbc->db));
 		ret = -EIO;
 		goto out;
@@ -644,12 +644,12 @@
 	/* verify execution result */
 	rc = sqlite3_changes(dbc->db);
 	if (!rc) {
-		LOGP(DAUC, LOGL_ERROR, "Cannot update LU timestamp for subscriber ID=%"PRId64
+		LOGP(DAUC, LOGL_ERROR, "Cannot update LU timestamp for subscriber ID=%" PRId64
 		     ": no such subscriber\n", subscr_id);
 		ret = -ENOENT;
 		goto out;
 	} else if (rc != 1) {
-		LOGP(DAUC, LOGL_ERROR, "Update LU timestamp for subscriber ID=%"PRId64
+		LOGP(DAUC, LOGL_ERROR, "Update LU timestamp for subscriber ID=%" PRId64
 		     ": SQL modified %d rows (expected 1)\n", subscr_id, rc);
 		ret = -EIO;
 	}
diff --git a/src/hlr_db_tool.c b/src/hlr_db_tool.c
index 1a9c60c..516b91e 100644
--- a/src/hlr_db_tool.c
+++ b/src/hlr_db_tool.c
@@ -300,7 +300,7 @@
 
 	imsi = sqlite3_column_int64(stmt, 0);
 
-	snprintf(imsi_str, sizeof(imsi_str), "%"PRId64, imsi);
+	snprintf(imsi_str, sizeof(imsi_str), "%" PRId64, imsi);
 
 	rc = db_subscr_create(dbc, imsi_str);
 	if (rc < 0) {

-- 
To view, visit https://gerrit.osmocom.org/12206
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7a81114f9afbefcbd62d434720854cfdd4a2dd9
Gerrit-Change-Number: 12206
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <stsp at stsp.name>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181207/f9180dc1/attachment.htm>


More information about the gerrit-log mailing list