for linter: s/while(0)/while (0)

Change-Id: Ib422e7d1a7d543dcd8738581839ce55bb8fc29d2
This commit is contained in:
Neels Hofmeyr 2021-11-06 17:01:58 +01:00
parent 0887442c20
commit 8700803fa8
14 changed files with 22 additions and 22 deletions

View File

@ -17,7 +17,7 @@
conn->assignment.new_lchan ? " of " : "", \
conn->assignment.new_lchan ? gsm_lchan_name(conn->assignment.new_lchan) : "", \
## args); \
} while(0)
} while (0)
enum assignment_fsm_state {
ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE,

View File

@ -17,7 +17,7 @@
else \
LOGP(DHODEC, level, "%s: " fmt, \
handover_status(conn), ## args); \
} while(0)
} while (0)
struct gsm_network;
struct gsm_lchan;

View File

@ -10,14 +10,14 @@
LOGPFSML((lchan)->fi, level, "(type=%s) " fmt, gsm_lchant_name((lchan)->type), ## args); \
else \
LOGP(DRSL, level, "%s (not initialized) " fmt, gsm_lchan_name(lchan), ## args); \
} while(0)
} while (0)
#define LCHAN_SET_LAST_ERROR(LCHAN, fmt, args...) do { \
if ((LCHAN)->last_error) \
talloc_free((LCHAN)->last_error); \
(LCHAN)->last_error = talloc_asprintf((LCHAN)->ts->trx, fmt, ##args); \
LOG_LCHAN(LCHAN, LOGL_ERROR, "%s\n", (LCHAN)->last_error); \
} while(0)
} while (0)
enum lchan_fsm_state {
LCHAN_ST_UNUSED,

View File

@ -7,7 +7,7 @@
else \
LOGP(DLMGCP, level, "%s (not initialized) " fmt, gsm_lchan_name(lchan), \
## args); \
} while(0)
} while (0)
struct gsm_lchan;
struct mgcp_conn_peer;

View File

@ -8,7 +8,7 @@
LOGPFSML((LOC_REQ)->fi, level, fmt, ## args); \
else \
LOGP(DLCS, level, "LCS Perf Loc Req: " fmt, ## args); \
} while(0)
} while (0)
struct lcs_ta_req;

View File

@ -11,7 +11,7 @@
LOGPFSML((TA_REQ)->fi, level, fmt, ## args); \
else \
LOGP(DLCS, level, "LCS TA Req: " fmt, ## args); \
} while(0)
} while (0)
enum lcs_ta_req_fsm_event {
LCS_TA_REQ_EV_GOT_TA,

View File

@ -17,7 +17,7 @@
gsm_ts_name(ts), \
## args, \
(!fmt || !*fmt || fmt[strlen(fmt)-1] != '\n') ? "\n" : ""); \
} while(0)
} while (0)
enum ts_fsm_state {
TS_ST_NOT_INITIALIZED,

View File

@ -74,7 +74,7 @@ static const struct osmo_tdef_state_timeout assignment_fsm_timeouts[32] = {
osmo_fsm_inst_state_name(fi), gsm0808_cause_name(cause), ## args); \
assignment_count_result(CTR_ASSIGNMENT_ERROR); \
on_assignment_failure(_conn); \
} while(0)
} while (0)
/* Assume presence of local var 'conn' as struct gsm_subscriber_connection */
#define assignment_count(counter) do { \
@ -98,7 +98,7 @@ static const struct osmo_tdef_state_timeout assignment_fsm_timeouts[32] = {
break; \
} \
} \
} while(0)
} while (0)
#define assignment_count_result(counter) do { \
if (!conn->assignment.result_rate_ctr_done) { \
@ -109,7 +109,7 @@ static const struct osmo_tdef_state_timeout assignment_fsm_timeouts[32] = {
"result rate counter already recorded, NOT counting as: %s %s\n", \
bsc_ctr_description[BSC_##counter].name, \
bsc_ctr_description[BSC_##counter].description); \
} while(0)
} while (0)
void assignment_reset(struct gsm_subscriber_connection *conn)
{

View File

@ -86,7 +86,7 @@
LOGPHOLCHANTOBTS((candidate)->current.lchan, (candidate)->target.bts, level, fmt, ## args); \
else if ((candidate)->target.cell_ids.id_list_len) \
LOGPHOLCHANTOREMOTE((candidate)->current.lchan, &(candidate)->target.cell_ids, level, fmt, ## args); \
} while(0)
} while (0)
#define REQUIREMENT_A_TCHF 0x01

View File

@ -90,7 +90,7 @@
bsc_ctr_description[counter].name, \
bsc_ctr_description[counter].description); \
rate_ctr_inc(rate_ctr_group_get_ctr(conn->network->bsc_ctrs, counter)); \
} while(0)
} while (0)
/* Assume presence of local var 'conn' as struct gsm_subscriber_connection.
* Handles bts == NULL gracefully
@ -106,12 +106,12 @@
rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, counter)); \
else \
rate_ctr_inc(rate_ctr_group_get_ctr(conn->network->bts_unknown_ctrs, counter)); \
} while(0)
} while (0)
#define ho_count(bts, counter) do { \
ho_count_bsc(BSC_##counter); \
ho_count_bts(bts, BTS_##counter); \
} while(0)
} while (0)
static uint8_t g_next_ho_ref = 1;
@ -212,12 +212,12 @@ static const struct osmo_tdef_state_timeout ho_fsm_timeouts[32] = {
LOG_HO(conn, LOGL_ERROR, "Handover failed in state %s, %s: " fmt "\n", \
osmo_fsm_inst_state_name(conn->fi), handover_result_name(result), ## args); \
handover_end(conn, result); \
} while(0)
} while (0)
#define ho_success() do { \
LOG_HO(conn, LOGL_DEBUG, "Handover succeeded\n"); \
handover_end(conn, HO_RESULT_OK); \
} while(0)
} while (0)
/* issue handover to a cell identified by ARFCN and BSIC */
int handover_request(struct handover_out_req *req)

View File

@ -302,7 +302,7 @@ struct osmo_tdef_state_timeout lchan_fsm_timeouts[32] = {
else \
LOG_LCHAN(_lchan, LOGL_DEBUG, "After failure handling, already in state %s\n", \
osmo_fsm_state_name(fsm, state_chg)); \
} while(0)
} while (0)
/* Which state to transition to when lchan_fail() is called in a given state. */
uint32_t lchan_fsm_on_error[34] = {

View File

@ -66,7 +66,7 @@ struct osmo_tdef_state_timeout lchan_rtp_fsm_timeouts[32] = {
LCHAN_SET_LAST_ERROR(_lchan, "lchan-rtp failure in state %s: " fmt, \
osmo_fsm_state_name(fi->fsm, state_was), ## args); \
osmo_fsm_inst_dispatch(_lchan->fi, LCHAN_EV_RTP_ERROR, 0); \
} while(0)
} while (0)
/* Called from lchan_fsm_init(), does not need to be visible in lchan_rtp_fsm.h */
void lchan_rtp_fsm_init()

View File

@ -81,7 +81,7 @@ static const struct osmo_tdef_state_timeout lcs_loc_req_fsm_timeouts[32] = {
.cause_val = cause, \
}; \
lcs_loc_req_fsm_state_chg(lcs_loc_req->fi, LCS_LOC_REQ_ST_FAILED); \
} while(0)
} while (0)
static struct lcs_loc_req *lcs_loc_req_alloc(struct osmo_fsm_inst *parent_fi, uint32_t parent_event_term)
{
@ -110,7 +110,7 @@ static bool parse_bssmap_perf_loc_req(struct lcs_loc_req *lcs_loc_req, struct ms
#define PARSE_ERR(ERRMSG) do { \
lcs_loc_req_fail(LCS_CAUSE_PROTOCOL_ERROR, "rx BSSMAP Perform Location Request: " ERRMSG); \
return false; \
} while(0)
} while (0)
payload_length = msg->tail - msg->l4h;
if (tlv_parse2(tp_arr, 1, gsm0808_att_tlvdef(), msg->l4h + 1, payload_length - 1, 0, 0) <= 0)

View File

@ -63,7 +63,7 @@ static const struct osmo_tdef_state_timeout lcs_ta_req_fsm_timeouts[32] = {
lcs_ta_req ? osmo_fsm_inst_state_name(lcs_ta_req->fi) : "NULL", ## args); \
lcs_ta_req->failure_cause = cause; \
lcs_ta_req_fsm_state_chg(lcs_ta_req->fi, LCS_TA_REQ_ST_FAILED); \
} while(0)
} while (0)
static struct osmo_fsm lcs_ta_req_fsm;