diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-11-06 03:46:24 +0900 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-11-06 03:46:24 +0900 |
commit | 14566e3ceda0b0f14d3ab4f41d41f5276125aa0c (patch) | |
tree | 376ff3fdbc84e7275c38ca68b1b5a4476e4215c3 /src/common/l1sap.c | |
parent | bb8037b7eb497ea418142a321a268abae6dc271d (diff) |
l1sap: fix wrong return value of is_fill_frame()
When determining if a frame is a fill frame or not, the case
statement only conditionally handled AGCH and PCH cases. In
case a non-fill-frame was observed, the return value was uninitialized,
resulting in some non-fill-frames to be missed from GMSTAP
Change-Id: I7b46c720e34cb8ef9a91ae5da28a050439a1937d
Closes: Coverity CID#174175
Diffstat (limited to 'src/common/l1sap.c')
-rw-r--r-- | src/common/l1sap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 763b355a..ebcfd2f3 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -335,9 +335,9 @@ static bool is_fill_frame(uint8_t chan_type, const uint8_t *data, unsigned int l if (!memcmp(data, paging_fill, GSM_MACBLOCK_LEN)) return true; break; - default: - return false; + /* don't use 'default' case here as the above only conditionally return true */ } + return false; } static int to_gsmtap(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) |