[PATCH] Rename struct to better match libosmocore conventions

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/OpenBSC@lists.osmocom.org/.

msuraev at sysmocom.de msuraev at sysmocom.de
Thu Mar 17 13:46:19 UTC 2016


From: Max <msuraev at sysmocom.de>

---
 include/osmocom/gsm/sysinfo.h | 8 ++++----
 src/gsm/sysinfo.c             | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/osmocom/gsm/sysinfo.h b/include/osmocom/gsm/sysinfo.h
index 346194e..e2fc09d 100644
--- a/include/osmocom/gsm/sysinfo.h
+++ b/include/osmocom/gsm/sysinfo.h
@@ -35,7 +35,7 @@ enum osmo_sysinfo_type {
 	_MAX_SYSINFO_TYPE
 };
 
-struct earfcn {
+struct osmo_earfcn_si2q {
 	/* EARFCN (16 bits) array */
 	uint16_t *arfcn;
 	/* Measurement Bandwidth (3 bits), might be absent
@@ -63,8 +63,8 @@ struct earfcn {
 typedef uint8_t sysinfo_buf_t[GSM_MACBLOCK_LEN];
 
 extern const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE];
-int osmo_earfcn_add(struct earfcn *e, uint16_t arfcn, uint8_t meas_bw);
-int osmo_earfcn_del(struct earfcn *e, uint16_t arfcn);
-void osmo_earfcn_init(struct earfcn *e);
+int osmo_earfcn_add(struct osmo_earfcn_si2q *e, uint16_t arfcn, uint8_t meas_bw);
+int osmo_earfcn_del(struct osmo_earfcn_si2q *e, uint16_t arfcn);
+void osmo_earfcn_init(struct osmo_earfcn_si2q *e);
 uint8_t osmo_sitype2rsl(enum osmo_sysinfo_type si_type);
 enum osmo_sysinfo_type osmo_rsl2sitype(uint8_t rsl_si);
diff --git a/src/gsm/sysinfo.c b/src/gsm/sysinfo.c
index e4d0ddf..42e717f 100644
--- a/src/gsm/sysinfo.c
+++ b/src/gsm/sysinfo.c
@@ -131,7 +131,7 @@ const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE] = {
  *  \param[in] meas_bw measurement bandwith value
  *  \returns 0 on success, error otherwise
  */
-int osmo_earfcn_add(struct earfcn *e, uint16_t arfcn, uint8_t meas_bw)
+int osmo_earfcn_add(struct osmo_earfcn_si2q *e, uint16_t arfcn, uint8_t meas_bw)
 {
 	size_t i;
 	for (i = 0; i < e->length; i++) {
@@ -150,7 +150,7 @@ int osmo_earfcn_add(struct earfcn *e, uint16_t arfcn, uint8_t meas_bw)
  *  \param[in] arfcn EARFCN value, 16 bits
  *  \returns 0 on success, error otherwise
  */
-int osmo_earfcn_del(struct earfcn *e, uint16_t arfcn)
+int osmo_earfcn_del(struct osmo_earfcn_si2q *e, uint16_t arfcn)
 {
 	size_t i;
 	for (i = 0; i < e->length; i++) {
@@ -166,7 +166,7 @@ int osmo_earfcn_del(struct earfcn *e, uint16_t arfcn)
 /*! \brief Initialize earfcn struct
  *  \param[in,out] e earfcn struct
  */
-void osmo_earfcn_init(struct earfcn *e)
+void osmo_earfcn_init(struct osmo_earfcn_si2q *e)
 {
 	size_t i;
 	for (i = 0; i < e->length; i++) {
-- 
2.7.3




More information about the OpenBSC mailing list