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 680acae725

Change-Id: Iddd97415a17b06b69f69ddca2e2e296eb2f23a89
This commit is contained in:
Philipp Maier 2018-03-05 13:26:44 +01:00 committed by Harald Welte
parent 075299db7c
commit bf86d71f58
1 changed files with 2 additions and 2 deletions

View File

@ -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);