Project

General

Profile

Actions

Support #3023

closed

src/common/pcu_sock.c/pcu_sock_close(): The array 'ts->lchan' is being utilized as a pointer to single object, ts->lchan[0] would be clearer

Added by fixeria about 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
-
Target version:
-
Start date:
03/01/2018
Due date:
% Done:

100%

Spec Reference:

Description

The gsm_bts_trx_ts struct has array of lchans:

struct gsm_lchan lchan[TS_MAX_LCHAN];

However, in the pcu_sock_close() it's utilized as a pointer to single object:

for (j = 0; j < 8; j++) {
    ts = &trx->ts[j];
    if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED
     && ts->pchan == GSM_PCHAN_PDCH) {
        ts->lchan->rel_act_kind = LCHAN_REL_ACT_PCU;
        l1sap_chan_rel(trx, gsm_lchan2chan_nr(ts->lchan));
    }
}

Is it intended?

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)