[PATCH] osmo-bsc[master]: cosmetic: gsm0408_test: drop unused arg from bts_init()

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 Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Mar 28 17:25:36 UTC 2018


Review at  https://gerrit.osmocom.org/7564

cosmetic: gsm0408_test: drop unused arg from bts_init()

Change-Id: I0c59d7b3240cf7a8ae1677d237dca9dd364188cb
---
M tests/gsm0408/gsm0408_test.c
1 file changed, 8 insertions(+), 7 deletions(-)


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

diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 9fd4ac7..67840f0 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -118,7 +118,8 @@
 	}
 }
 
-static inline struct gsm_bts *bts_init(void *ctx, struct gsm_network *net, const char *msg)
+#define bts_init(net) _bts_init(net, __func__)
+static inline struct gsm_bts *_bts_init(struct gsm_network *net, const char *msg)
 {
 	struct gsm_bts *bts = gsm_bts_alloc(net, 0);
 	if (!bts) {
@@ -144,7 +145,7 @@
 
 static inline void test_si2q_segfault(struct gsm_network *net)
 {
-	struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
+	struct gsm_bts *bts = bts_init(net);
 	printf("Test SI2quater UARFCN (same scrambling code and diversity):\n");
 
 	_bts_uarfcn_add(bts, 10564, 319, 0);
@@ -156,7 +157,7 @@
 
 static inline void test_si2q_mu(struct gsm_network *net)
 {
-	struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
+	struct gsm_bts *bts = bts_init(net);
 	printf("Test SI2quater multiple UARFCNs:\n");
 
 	_bts_uarfcn_add(bts, 10564, 318, 0);
@@ -172,7 +173,7 @@
 
 static inline void test_si2q_u(struct gsm_network *net)
 {
-	struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
+	struct gsm_bts *bts = bts_init(net);
 	printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n");
 
 	/* first generate invalid SI as no UARFCN added */
@@ -196,7 +197,7 @@
 
 static inline void test_si2q_e(struct gsm_network *net)
 {
-	struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
+	struct gsm_bts *bts = bts_init(net);
 	printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n");
 
 	bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list;
@@ -225,7 +226,7 @@
 
 static inline void test_si2q_long(struct gsm_network *net)
 {
-	struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
+	struct gsm_bts *bts = bts_init(net);
 	printf("Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation:\n");
 
 	bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list;
@@ -629,7 +630,7 @@
 
 static void test_si_ba_ind(struct gsm_network *net)
 {
-	struct gsm_bts *bts = bts_init(tall_bsc_ctx, net, __func__);
+	struct gsm_bts *bts = bts_init(net);
 
 	const struct gsm48_system_information_type_2 *si2 =
 		(struct gsm48_system_information_type_2 *) GSM_BTS_SI(bts, SYSINFO_TYPE_2);

-- 
To view, visit https://gerrit.osmocom.org/7564
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c59d7b3240cf7a8ae1677d237dca9dd364188cb
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list