Change in osmo-bsc[master]: cosmetic loop simplification in gsm48_multirate_config()

neels gerrit-no-reply at lists.osmocom.org
Thu Jun 10 15:22:09 UTC 2021


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24394 )

Change subject: cosmetic loop simplification in gsm48_multirate_config()
......................................................................

cosmetic loop simplification in gsm48_multirate_config()

Change-Id: I52424ad6a0bf499fe040cf0a1de00e636a0a40fe
---
M src/osmo-bsc/gsm_04_08_rr.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  neels: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve



diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index a641b45..16fe999 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -417,13 +417,13 @@
 	uint8_t *data;
 
 	/* Check if modes for consistency (order and duplicates) */
-	for (i = 0; i < num_modes; i++) {
-		if (i > 0 && modes[i - 1].mode > modes[i].mode) {
+	for (i = 1; i < num_modes; i++) {
+		if (modes[i - 1].mode > modes[i].mode) {
 			LOGP(DRR, LOGL_ERROR,
 			     "BUG: Multirate codec with inconsistent config (mode order).\n");
 			return -EINVAL;
 		}
-		if (i > 0 && modes[i - 1].mode == modes[i].mode) {
+		if (modes[i - 1].mode == modes[i].mode) {
 			LOGP(DRR, LOGL_ERROR,
 			     "BUG: Multirate codec with inconsistent config (duplicate modes).\n");
 			return -EINVAL;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24394
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I52424ad6a0bf499fe040cf0a1de00e636a0a40fe
Gerrit-Change-Number: 24394
Gerrit-PatchSet: 25
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210610/d8ca9412/attachment.htm>


More information about the gerrit-log mailing list