fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/28120 )
Change subject: coding: cosmetic: move 'dtx_prev' to the scope where it's used ......................................................................
coding: cosmetic: move 'dtx_prev' to the scope where it's used
Change-Id: I147f44f1c071e53febeff425a0a7837a0ff10436 Related: SYS#5853 --- M src/coding/gsm0503_coding.c 1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/20/28120/1
diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 3ad2861..34b213c 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -2162,7 +2162,6 @@ *n_errors = 0; *n_bits_total = 0; static ubit_t sid_first_dummy[64] = { 0 }; sbit_t sid_update_enc[256]; - uint8_t dtx_prev;
for (i=0; i<8; i++) { gsm0503_tch_burst_unmap(&iB[i * 114], &bursts[i * 116], &h, i >> 2); @@ -2184,7 +2183,7 @@ /* Determine the DTX frame type (SID_UPDATE, ONSET etc...) */ if (dtx) { osmo_sbit2ubit(cBd, cB, 456); - dtx_prev = *dtx; + const enum gsm0503_amr_dtx_frames dtx_prev = *dtx; *dtx = gsm0503_detect_afs_dtx_frame(n_errors, n_bits_total, cBd);
if (dtx_prev == AFS_SID_UPDATE && *dtx == AMR_OTHER) { @@ -2612,7 +2611,6 @@ int i, j, k, best = 0, rv, len, steal = 0, id = 0; ubit_t cBd[456]; static ubit_t sid_first_dummy[64] = { 0 }; - uint8_t dtx_prev;
/* only unmap the stealing bits */ if (!odd) { @@ -2659,7 +2657,7 @@ /* Determine the DTX frame type (SID_UPDATE, ONSET etc...) */ if (dtx) { osmo_sbit2ubit(cBd, cB, 456); - dtx_prev = *dtx; + const enum gsm0503_amr_dtx_frames dtx_prev = *dtx; *dtx = gsm0503_detect_ahs_dtx_frame(n_errors, n_bits_total, cBd);
if (dtx_prev == AHS_SID_UPDATE && *dtx == AMR_OTHER) {