Change in osmo-bsc[master]: for linter: s/while(0)/while (0)

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

neels gerrit-no-reply at lists.osmocom.org
Sat Nov 6 16:03:33 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26134 )


Change subject: for linter: s/while(0)/while (0)
......................................................................

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

Change-Id: Ib422e7d1a7d543dcd8738581839ce55bb8fc29d2
---
M include/osmocom/bsc/assignment_fsm.h
M include/osmocom/bsc/handover.h
M include/osmocom/bsc/lchan_fsm.h
M include/osmocom/bsc/lchan_rtp_fsm.h
M include/osmocom/bsc/lcs_loc_req.h
M include/osmocom/bsc/lcs_ta_req.h
M include/osmocom/bsc/timeslot_fsm.h
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/handover_decision_2.c
M src/osmo-bsc/handover_fsm.c
M src/osmo-bsc/lchan_fsm.c
M src/osmo-bsc/lchan_rtp_fsm.c
M src/osmo-bsc/lcs_loc_req.c
M src/osmo-bsc/lcs_ta_req.c
14 files changed, 22 insertions(+), 22 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/34/26134/1

diff --git a/include/osmocom/bsc/assignment_fsm.h b/include/osmocom/bsc/assignment_fsm.h
index 3a64f7d..6c429e4 100644
--- a/include/osmocom/bsc/assignment_fsm.h
+++ b/include/osmocom/bsc/assignment_fsm.h
@@ -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,
diff --git a/include/osmocom/bsc/handover.h b/include/osmocom/bsc/handover.h
index f671491..58fea35 100644
--- a/include/osmocom/bsc/handover.h
+++ b/include/osmocom/bsc/handover.h
@@ -17,7 +17,7 @@
 	else \
 		LOGP(DHODEC, level, "%s: " fmt, \
 		     handover_status(conn), ## args); \
-	} while(0)
+	} while (0)
 
 struct gsm_network;
 struct gsm_lchan;
diff --git a/include/osmocom/bsc/lchan_fsm.h b/include/osmocom/bsc/lchan_fsm.h
index fa0d299..eb8312e 100644
--- a/include/osmocom/bsc/lchan_fsm.h
+++ b/include/osmocom/bsc/lchan_fsm.h
@@ -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,
diff --git a/include/osmocom/bsc/lchan_rtp_fsm.h b/include/osmocom/bsc/lchan_rtp_fsm.h
index 6ff8fe3..18ab348 100644
--- a/include/osmocom/bsc/lchan_rtp_fsm.h
+++ b/include/osmocom/bsc/lchan_rtp_fsm.h
@@ -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;
diff --git a/include/osmocom/bsc/lcs_loc_req.h b/include/osmocom/bsc/lcs_loc_req.h
index ba677e8..86540f2 100644
--- a/include/osmocom/bsc/lcs_loc_req.h
+++ b/include/osmocom/bsc/lcs_loc_req.h
@@ -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;
 
diff --git a/include/osmocom/bsc/lcs_ta_req.h b/include/osmocom/bsc/lcs_ta_req.h
index b9b7a4e..bdfc14f 100644
--- a/include/osmocom/bsc/lcs_ta_req.h
+++ b/include/osmocom/bsc/lcs_ta_req.h
@@ -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,
diff --git a/include/osmocom/bsc/timeslot_fsm.h b/include/osmocom/bsc/timeslot_fsm.h
index 5e62188..526f3cf 100644
--- a/include/osmocom/bsc/timeslot_fsm.h
+++ b/include/osmocom/bsc/timeslot_fsm.h
@@ -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,
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index f9a81b3..656bd3e 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -74,7 +74,7 @@
 			       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 @@
 				break; \
 			} \
 		} \
-	} while(0)
+	} while (0)
 
 #define assignment_count_result(counter) do { \
 		if (!conn->assignment.result_rate_ctr_done) { \
@@ -109,7 +109,7 @@
 				       "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)
 {
diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c
index d08173c..e384feb 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -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
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 255478f..82a0588 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -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 @@
 		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)
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 52aadce..d61d032 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -302,7 +302,7 @@
 		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] = {
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index 7bd8209..62cd100 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -66,7 +66,7 @@
 		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()
diff --git a/src/osmo-bsc/lcs_loc_req.c b/src/osmo-bsc/lcs_loc_req.c
index 7153ce6..d2ea72d 100644
--- a/src/osmo-bsc/lcs_loc_req.c
+++ b/src/osmo-bsc/lcs_loc_req.c
@@ -81,7 +81,7 @@
 			.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 @@
 #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)
diff --git a/src/osmo-bsc/lcs_ta_req.c b/src/osmo-bsc/lcs_ta_req.c
index bcee6e1..6252d46 100644
--- a/src/osmo-bsc/lcs_ta_req.c
+++ b/src/osmo-bsc/lcs_ta_req.c
@@ -63,7 +63,7 @@
 			       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;
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26134
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib422e7d1a7d543dcd8738581839ce55bb8fc29d2
Gerrit-Change-Number: 26134
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211106/45f55ff9/attachment.htm>


More information about the gerrit-log mailing list