.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * (C) 2004-2009 Dominik Brodowski <linux@dominikbrodowski.de> |
---|
3 | | - * |
---|
4 | | - * Licensed under the terms of the GNU GPL License version 2. |
---|
5 | 4 | */ |
---|
6 | 5 | |
---|
7 | 6 | |
---|
.. | .. |
---|
100 | 99 | continue; |
---|
101 | 100 | |
---|
102 | 101 | if (str[cp] == '.') { |
---|
103 | | - while (power > -1 && isdigit(str[cp+1])) |
---|
104 | | - cp++, power--; |
---|
| 102 | + while (power > -1 && isdigit(str[cp+1])) { |
---|
| 103 | + cp++; |
---|
| 104 | + power--; |
---|
| 105 | + } |
---|
105 | 106 | } |
---|
106 | | - if (power >= -1) /* not enough => pad */ |
---|
| 107 | + if (power >= -1) { /* not enough => pad */ |
---|
107 | 108 | pad = power + 1; |
---|
108 | | - else /* to much => strip */ |
---|
109 | | - pad = 0, cp += power + 1; |
---|
| 109 | + } else { /* too much => strip */ |
---|
| 110 | + pad = 0; |
---|
| 111 | + cp += power + 1; |
---|
| 112 | + } |
---|
110 | 113 | /* check bounds */ |
---|
111 | 114 | if (cp <= 0 || cp + pad > NORM_FREQ_LEN - 1) |
---|
112 | 115 | return 0; |
---|