This generates more efficient code for the trie traversing loop,
using registers instead of stack locations for the variables.
... | ... |
@@ -1169,7 +1169,7 @@ int cli_ac_scanbuff(const unsigned char *buffer, uint32_t length, const char **v |
1169 | 1169 |
for(i = 0; i < length; i++) { |
1170 | 1170 |
current = current->trans[buffer[i]]; |
1171 | 1171 |
|
1172 |
- if(IS_FINAL(current)) { |
|
1172 |
+ if(UNLIKELY(IS_FINAL(current))) { |
|
1173 | 1173 |
faillist = NULL; |
1174 | 1174 |
patt = current->list; |
1175 | 1175 |
if(IS_LEAF(current)) { |