Commit 7973e7a
committed
ipv4: Optimize ip4addr_aton()
If <ctype.h> is not used, then lwip_in_range() is available. Use it to
optimize the hexadecimal number case. Here, the digit case is already
handled. Check only for alphabet ranges and combine it with the case
selection. This eliminates a couple of dead branches.1 parent 3cc4048 commit 7973e7a
1 file changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
184 | 196 | | |
185 | 197 | | |
| 198 | + | |
186 | 199 | | |
187 | 200 | | |
188 | 201 | | |
| |||
0 commit comments