diff options
author | Harald Welte <laforge@osmocom.org> | 2020-04-20 20:14:01 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-04-20 20:14:01 +0200 |
commit | d2550da76f9974bb1957f74c5d3eb75fdae923d9 (patch) | |
tree | 8f6d6f3a27127253cafb26a5987c5f102e6321ea | |
parent | 5b5b8666816e2a081dd18502fec39a04f88939c5 (diff) |
fix compilation with gcc-10
See also: https://alioth-lists.debian.net/pipermail/debian-mobcom-maintainers/Week-of-Mon-20200413/000648.html
Change-Id: I0e9596c3ef26231999c729b5cc408fcaca3790fc
-rw-r--r-- | openbsc/include/openbsc/gsm_data_shared.h | 8 | ||||
-rw-r--r-- | openbsc/src/libbsc/bsc_subscriber.c | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index e616c1260..23acf2f8b 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -379,13 +379,13 @@ struct gsm_lchan { #endif }; -enum { +enum gsm_bts_trx_ts_flags { TS_F_PDCH_ACTIVE = 0x1000, TS_F_PDCH_ACT_PENDING = 0x2000, TS_F_PDCH_DEACT_PENDING = 0x4000, TS_F_PDCH_PENDING_MASK = 0x6000 /*< TS_F_PDCH_ACT_PENDING | TS_F_PDCH_DEACT_PENDING */ -} gsm_bts_trx_ts_flags; +}; /* One Timeslot in a TRX */ struct gsm_bts_trx_ts { @@ -945,8 +945,8 @@ enum gsm_bts_type_variant str2btsvariant(const char *arg); const char *btsvariant2str(enum gsm_bts_type_variant v); extern const struct value_string gsm_chreq_descs[]; -const struct value_string gsm_pchant_names[13]; -const struct value_string gsm_pchant_descs[13]; +extern const struct value_string gsm_pchant_names[13]; +extern const struct value_string gsm_pchant_descs[13]; 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); diff --git a/openbsc/src/libbsc/bsc_subscriber.c b/openbsc/src/libbsc/bsc_subscriber.c index 73e61e801..f4300d760 100644 --- a/openbsc/src/libbsc/bsc_subscriber.c +++ b/openbsc/src/libbsc/bsc_subscriber.c @@ -91,6 +91,8 @@ struct bsc_subscr *bsc_subscr_find_or_create_by_imsi(struct llist_head *list, if (bsub) return bsub; bsub = bsc_subscr_alloc(list); + if (!bsub) + return NULL; bsc_subscr_set_imsi(bsub, imsi); return bsub; } @@ -103,6 +105,8 @@ struct bsc_subscr *bsc_subscr_find_or_create_by_tmsi(struct llist_head *list, if (bsub) return bsub; bsub = bsc_subscr_alloc(list); + if (!bsub) + return NULL; bsub->tmsi = tmsi; return bsub; } |