components/bt: Fix warning when disable debug logs or in release mode and improve the code structure

This commit is contained in:
baohongde
2019-03-26 14:46:36 +08:00
parent c76f00373f
commit dca83700f2
52 changed files with 477 additions and 264 deletions

View File

@@ -241,25 +241,25 @@ static uint_8t gf_inv(const uint_8t x)
}
for ( ; ; ) {
if (n1)
if (n1) {
while (n2 >= n1) { /* divide polynomial p2 by p1 */
n2 /= n1; /* shift smaller polynomial left */
p2 ^= (p1 * n2) & 0xff; /* and remove from larger one */
v2 ^= (v1 * n2); /* shift accumulated value and */
n2 = hibit(p2); /* add into result */
}
else {
} else {
return v1;
}
if (n2) /* repeat with values swapped */
if (n2) { /* repeat with values swapped */
while (n1 >= n2) {
n1 /= n2;
p1 ^= p2 * n1;
v1 ^= v2 * n1;
n1 = hibit(p1);
}
else {
} else {
return v2;
}
}