cosmetic: lchan_sacch_get: early-exit instead of nested-if
Change-Id: I1fbf7d7f619cc8194c8094cf4a1826b6114f0e11
This commit is contained in:
parent
7a18906cfa
commit
ae50f7dac2
|
@ -151,10 +151,10 @@ uint8_t *lchan_sacch_get(struct gsm_lchan *lchan)
|
||||||
uint32_t tmp;
|
uint32_t tmp;
|
||||||
|
|
||||||
for (tmp = lchan->si.last + 1; tmp != lchan->si.last; tmp = (tmp + 1) % _MAX_SYSINFO_TYPE) {
|
for (tmp = lchan->si.last + 1; tmp != lchan->si.last; tmp = (tmp + 1) % _MAX_SYSINFO_TYPE) {
|
||||||
if (lchan->si.valid & (1 << tmp)) {
|
if (!(lchan->si.valid & (1 << tmp)))
|
||||||
lchan->si.last = tmp;
|
continue;
|
||||||
return lchan->si.buf[tmp];
|
lchan->si.last = tmp;
|
||||||
}
|
return lchan->si.buf[tmp];
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue