handover_test: fix ts_str may be uninitialized
Fix for: handover_test.c: In function 'res_ind': handover_test.c:1094:30: error: 'ts_str' may be used uninitialized in this function [-Werror=maybe-uninitialized] char subslot_val = ts_str[lchan->nr]; Fixes: f76424 ("RES IND: add test_resource_indication.ho_vty") Change-Id: I398ba24b945bad96896eeb5ddbaff9c48bacf8ab
This commit is contained in:
parent
5ac7075643
commit
e0c62bb9bd
|
@ -1077,7 +1077,7 @@ DEFUN(res_ind, res_ind_cmd,
|
|||
|
||||
level = 0xff;
|
||||
for (i = 0; i < ARRAY_SIZE(trx->ts); i++) {
|
||||
const char *ts_str;
|
||||
const char *ts_str = NULL;
|
||||
struct gsm_lchan *lchan;
|
||||
size_t given_subslots = 0;
|
||||
struct gsm_bts_trx_ts *ts = &trx->ts[i];
|
||||
|
@ -1090,7 +1090,7 @@ DEFUN(res_ind, res_ind_cmd,
|
|||
ts_for_n_lchans(lchan, ts, ts->max_lchans_possible) {
|
||||
int chan_nr;
|
||||
|
||||
if (lchan->nr < given_subslots) {
|
||||
if (lchan->nr < given_subslots && ts_str) {
|
||||
char subslot_val = ts_str[lchan->nr];
|
||||
switch (subslot_val) {
|
||||
case '-':
|
||||
|
|
Loading…
Reference in New Issue