matcher-ac: optimize the not-taken case

This generates more efficient code for the trie traversing loop,
using registers instead of stack locations for the variables.
remotes/push_mirror/cliemu_dump
Török Edvin 14 years ago
parent ac47dac79d
commit e7fbb6a7d9
  1. 2
      libclamav/matcher-ac.c

@ -1169,7 +1169,7 @@ int cli_ac_scanbuff(const unsigned char *buffer, uint32_t length, const char **v
for(i = 0; i < length; i++) {
current = current->trans[buffer[i]];
if(IS_FINAL(current)) {
if(UNLIKELY(IS_FINAL(current))) {
faillist = NULL;
patt = current->list;
if(IS_LEAF(current)) {

Loading…
Cancel
Save