diff options
author | Max <msuraev@sysmocom.de> | 2017-09-08 12:33:34 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-09-08 12:51:03 +0200 |
commit | 1962136a333a03e3ed33e96f4fb350fad61b3170 (patch) | |
tree | 439f09c6386a70199e6557d83241f3ea73672bec /src/gprs_ms.cpp | |
parent | 5a6bcfb7977b9db8964016582e51218a60c8431f (diff) |
Assert valid CS
The coding scheme converted to number make sense only if it's
valid. This is implicitly assumed by the code using this conversion as
non-zero value. Make those assumptions explicit with OSMO_ASSERT().
Change-Id: I8f62627b7b7b89dfa1b0d1a7e71b95b2c40fdffa
Fixes: CID70466
Diffstat (limited to 'src/gprs_ms.cpp')
-rw-r--r-- | src/gprs_ms.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp index 66312fa9..33d9cad5 100644 --- a/src/gprs_ms.cpp +++ b/src/gprs_ms.cpp @@ -630,6 +630,8 @@ void GprsMs::update_cs_ul(const pcu_l1_meas *meas) return; } + OSMO_ASSERT(current_cs_num > 0); + if (!m_current_cs_ul) return; |