aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-12-07 12:44:50 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-12-07 12:45:19 +0100
commit705b61bcb795490e265027d0b45499b87dd65e12 (patch)
treef697a7e382d9f24a95980172fb2c676255c7a70a /src
parent638ba8cc049b35c1a6a604fb058a92cff68198e1 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/ctrl.c4
-rw-r--r--src/db_auc.c6
-rw-r--r--src/db_hlr.c22
-rw-r--r--src/hlr_db_tool.c2
4 files changed, 17 insertions, 17 deletions
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 @@ static void print_subscr_info(struct ctrl_cmd *cmd,
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 @@ static void print_subscr_info_aud3g(struct ctrl_cmd *cmd, struct osmo_sub_auth_d
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 @@ int db_update_sqn(struct db_context *dbc, int64_t subscr_id, uint64_t new_sqn)
/* 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 @@ int db_update_sqn(struct db_context *dbc, int64_t subscr_id, uint64_t new_sqn)
/* 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 @@ int db_subscr_delete_by_id(struct db_context *dbc, int64_t subscr_id)
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 @@ int db_subscr_delete_by_id(struct db_context *dbc, int64_t subscr_id)
/* 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 @@ int db_subscr_update_aud_by_id(struct db_context *dbc, int64_t subscr_id,
* 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 @@ int db_subscr_get_by_id(struct db_context *dbc, int64_t id,
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 @@ int db_subscr_lu(struct db_context *dbc, int64_t subscr_id,
/* 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 @@ int db_subscr_lu(struct db_context *dbc, int64_t subscr_id,
/* 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 @@ int db_subscr_lu(struct db_context *dbc, int64_t subscr_id,
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 @@ int db_subscr_lu(struct db_context *dbc, int64_t subscr_id,
/* 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 @@ void import_nitb_subscr(sqlite3 *nitb_db, sqlite3_stmt *stmt)
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) {