summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-09-19 14:21:51 +0200
committerHarald Welte <laforge@gnumonks.org>2011-09-26 23:44:48 +0200
commit4f8ad5350a1e4dbccf72cc4a61f2b3665e5202ac (patch)
treefaaa28e9f979ef94f7c087643fd792f047db5450
parent1942729fa7f114c6515b7d72f9b1addc7c710f97 (diff)
gsm_data_shared: use 'const' whenever applicable
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h14
-rw-r--r--openbsc/src/libcommon/gsm_data_shared.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 4516aba40..ceb53983d 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -584,15 +584,15 @@ struct gsm_bts {
struct gsm_bts *gsm_bts_alloc(void *talloc_ctx);
struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts);
-struct gsm_bts_trx *gsm_bts_trx_num(struct gsm_bts *bts, int num);
+struct gsm_bts_trx *gsm_bts_trx_num(const struct gsm_bts *bts, int num);
const char *gsm_pchan_name(enum gsm_phys_chan_config c);
enum gsm_phys_chan_config gsm_pchan_parse(const char *name);
const char *gsm_lchant_name(enum gsm_chan_t c);
const char *gsm_chreq_name(enum gsm_chreq_reason_t c);
-char *gsm_trx_name(struct gsm_bts_trx *trx);
-char *gsm_ts_name(struct gsm_bts_trx_ts *ts);
-char *gsm_lchan_name(struct gsm_lchan *lchan);
+char *gsm_trx_name(const struct gsm_bts_trx *trx);
+char *gsm_ts_name(const struct gsm_bts_trx_ts *ts);
+char *gsm_lchan_name(const struct gsm_lchan *lchan);
const char *gsm_lchans_name(enum gsm_lchan_state s);
@@ -600,14 +600,14 @@ void gsm_abis_mo_reset(struct gsm_abis_mo *mo);
struct gsm_abis_mo *
gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
- struct abis_om_obj_inst *obj_inst);
+ const struct abis_om_obj_inst *obj_inst);
struct gsm_nm_state *
gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class,
- struct abis_om_obj_inst *obj_inst);
+ const struct abis_om_obj_inst *obj_inst);
void *
gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class,
- struct abis_om_obj_inst *obj_inst);
+ const struct abis_om_obj_inst *obj_inst);
/* reset the state of all MO in the BTS */
void gsm_bts_mo_reset(struct gsm_bts *bts);
diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c
index b52d58ad2..06a095e27 100644
--- a/openbsc/src/libcommon/gsm_data_shared.c
+++ b/openbsc/src/libcommon/gsm_data_shared.c
@@ -245,7 +245,7 @@ void gsm_bts_mo_reset(struct gsm_bts *bts)
}
}
-struct gsm_bts_trx *gsm_bts_trx_num(struct gsm_bts *bts, int num)
+struct gsm_bts_trx *gsm_bts_trx_num(const struct gsm_bts *bts, int num)
{
struct gsm_bts_trx *trx;
@@ -262,7 +262,7 @@ struct gsm_bts_trx *gsm_bts_trx_num(struct gsm_bts *bts, int num)
static char ts2str[255];
-char *gsm_trx_name(struct gsm_bts_trx *trx)
+char *gsm_trx_name(const struct gsm_bts_trx *trx)
{
snprintf(ts2str, sizeof(ts2str), "(bts=%d,trx=%d)",
trx->bts->nr, trx->nr);
@@ -271,7 +271,7 @@ char *gsm_trx_name(struct gsm_bts_trx *trx)
}
-char *gsm_ts_name(struct gsm_bts_trx_ts *ts)
+char *gsm_ts_name(const struct gsm_bts_trx_ts *ts)
{
snprintf(ts2str, sizeof(ts2str), "(bts=%d,trx=%d,ts=%d)",
ts->trx->bts->nr, ts->trx->nr, ts->nr);
@@ -279,7 +279,7 @@ char *gsm_ts_name(struct gsm_bts_trx_ts *ts)
return ts2str;
}
-char *gsm_lchan_name(struct gsm_lchan *lchan)
+char *gsm_lchan_name(const struct gsm_lchan *lchan)
{
struct gsm_bts_trx_ts *ts = lchan->ts;
@@ -292,7 +292,7 @@ char *gsm_lchan_name(struct gsm_lchan *lchan)
/* obtain the MO structure for a given object instance */
struct gsm_abis_mo *
gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
- struct abis_om_obj_inst *obj_inst)
+ const struct abis_om_obj_inst *obj_inst)
{
struct gsm_bts_trx *trx;
struct gsm_abis_mo *mo = NULL;
@@ -373,7 +373,7 @@ gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
/* obtain the gsm_nm_state data structure for a given object instance */
struct gsm_nm_state *
gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class,
- struct abis_om_obj_inst *obj_inst)
+ const struct abis_om_obj_inst *obj_inst)
{
struct gsm_abis_mo *mo;
@@ -387,7 +387,7 @@ gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class,
/* obtain the in-memory data structure of a given object instance */
void *
gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class,
- struct abis_om_obj_inst *obj_inst)
+ const struct abis_om_obj_inst *obj_inst)
{
struct gsm_bts_trx *trx;
void *obj = NULL;