Hi Andreas,
while using Smatch on layer23, I discovered a potential problem in GSM 03.22: There is a loop with an if-statement, and there might be missing curly braces.
Do you think this is the correct way to fix it?
diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 210215e..766ffbf 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -983,9 +983,10 @@ static int gsm322_a_user_resel(struct osmocom_ms *ms, struct msgb *msg) /* search current PLMN in list */ llist_for_each_entry(plmn_entry, &plmn->sorted_plmn, entry) { if (plmn_entry->mcc == plmn->mcc - && plmn_entry->mnc == plmn->mnc) + && plmn_entry->mnc == plmn->mnc) { plmn_found = plmn_entry; break; + } }
/* abort if list is empty */
baseband-devel@lists.osmocom.org