diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-10 23:20:09 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-10-11 20:25:29 +0000 |
commit | 1e31d18822c919896d26246950f5bca2e52dfeb5 (patch) | |
tree | a00d45c83f75b8392696fedbe7f095211ab69f7e | |
parent | e9c0c5b2724e9e0f749e9c24d77e73d7cbe3ede6 (diff) |
cosmetic: db_hlr: SL3_TXT: clarify indenting
Before, it looked like the nul term was within the if () body (despite no body
being present).
While at it, also remove one of the two tabs of indenting and put the opening
'do {' on its own line.
Change-Id: I8d03433b6fba90f4e46814bc54636bc3a444cc46
-rw-r--r-- | src/db_hlr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/db_hlr.c b/src/db_hlr.c index 4bccca4..5db2c9e 100644 --- a/src/db_hlr.c +++ b/src/db_hlr.c @@ -30,12 +30,13 @@ #define LOGHLR(imsi, level, fmt, args ...) LOGP(DAUC, level, "IMSI='%s': " fmt, imsi, ## args) -#define SL3_TXT(x, stmt, idx) do { \ - const char *_txt = (const char *) sqlite3_column_text(stmt, idx); \ - if (_txt) \ - strncpy(x, _txt, sizeof(x)); \ - x[sizeof(x)-1] = '\0'; \ - } while (0) +#define SL3_TXT(x, stmt, idx) \ + do { \ + const char *_txt = (const char *) sqlite3_column_text(stmt, idx);\ + if (_txt) \ + strncpy(x, _txt, sizeof(x)); \ + x[sizeof(x)-1] = '\0'; \ + } while (0) int db_subscr_get_by_imsi(struct db_context *dbc, const char *imsi, struct hlr_subscriber *subscr) |