From 1e31d18822c919896d26246950f5bca2e52dfeb5 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 10 Oct 2017 23:20:09 +0200 Subject: 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 --- src/db_hlr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') 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) -- cgit v1.2.3