diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2018-03-05 13:26:44 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-03-05 17:37:46 +0000 |
commit | bf86d71f58f83f53e740d64e649884c91ee77c26 (patch) | |
tree | 6c758a3431d416a8ea757c05db9c9f46e069091c /include | |
parent | 075299db7c01a4b068438341caca392fc6b03312 (diff) |
features: define osmo_bts_*_feature() as static inline
The functions osmo_bts_set_feature() and osmo_bts_has_feature() are
currently defined as inline. Since inline is a hinting, the compiler
might choose not to inline the function. This eventually leads to
linker problems because the function is then defined multiple times.
- use "static inline" instead of "inline" only.
This patch is a follow up patch to
Change Id 680acae725b2b8dda2f239ff20073306fdfb3f6e
Change-Id: Iddd97415a17b06b69f69ddca2e2e296eb2f23a89
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/gsm/bts_features.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/osmocom/gsm/bts_features.h b/include/osmocom/gsm/bts_features.h index f9b0142f..e84f95b6 100644 --- a/include/osmocom/gsm/bts_features.h +++ b/include/osmocom/gsm/bts_features.h @@ -30,13 +30,13 @@ extern const struct value_string osmo_bts_features_descs[]; const char *osmo_bts_feature_name(enum osmo_bts_features feature); -inline int osmo_bts_set_feature(struct bitvec *features, enum osmo_bts_features feature) +static inline int osmo_bts_set_feature(struct bitvec *features, enum osmo_bts_features feature) { OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES); return bitvec_set_bit_pos(features, feature, 1); } -inline bool osmo_bts_has_feature(const struct bitvec *features, enum osmo_bts_features feature) +static inline bool osmo_bts_has_feature(const struct bitvec *features, enum osmo_bts_features feature) { OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES); return bitvec_get_bit_pos(features, feature); |