laforge has submitted this change. ( 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, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 3ad2861..329a076 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); @@ -2183,8 +2182,9 @@ /* Determine the DTX frame type (SID_UPDATE, ONSET etc...) */ if (dtx) { + const enum gsm0503_amr_dtx_frames dtx_prev = *dtx; + osmo_sbit2ubit(cBd, cB, 456); - 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 +2612,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) { @@ -2658,8 +2657,9 @@ /* Determine the DTX frame type (SID_UPDATE, ONSET etc...) */ if (dtx) { + const enum gsm0503_amr_dtx_frames dtx_prev = *dtx; + osmo_sbit2ubit(cBd, cB, 456); - dtx_prev = *dtx; *dtx = gsm0503_detect_ahs_dtx_frame(n_errors, n_bits_total, cBd); if (dtx_prev == AHS_SID_UPDATE && *dtx == AMR_OTHER) { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28120 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I147f44f1c071e53febeff425a0a7837a0ff10436 Gerrit-Change-Number: 28120 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged