X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=postlicyd%2Fstrlist.c;h=875ee231f30e109a2a971ae03a710fbb6947a465;hb=ddf3e587c41536baad71de4008eafd64b8c00d58;hp=20e6a5818094327138cd728422dd32f2ea260145;hpb=d229b104fb45ef8a5b968da80383f571625fa976;p=apps%2Fpfixtools.git diff --git a/postlicyd/strlist.c b/postlicyd/strlist.c index 20e6a58..875ee23 100644 --- a/postlicyd/strlist.c +++ b/postlicyd/strlist.c @@ -319,18 +319,18 @@ static filter_result_t strlist_filter(const filter_t *filter, const query_t *que return HTK_ABORT; } #define LOOKUP(Flag, Field) \ - if (config->match_ ## Flag) { \ - const int len = m_strlen(query->Field); \ - strlist_copy(normal, query->Field, len, false); \ - strlist_copy(reverse, query->Field, len, true); \ - for (int i = 0 ; i < config->tries.len ; ++i) { \ - const int weight = array_elt(config->weights, i); \ - const trie_t *trie = array_elt(config->tries, i); \ - const bool rev = array_elt(config->reverses, i); \ - if (trie_lookup(trie, rev ? reverse : normal)) { \ - sum += weight; \ - } \ - } \ + if (config->match_ ## Flag) { \ + const int len = m_strlen(query->Field); \ + strlist_copy(normal, query->Field, len, false); \ + strlist_copy(reverse, query->Field, len, true); \ + for (uint32_t i = 0 ; i < config->tries.len ; ++i) { \ + const int weight = array_elt(config->weights, i); \ + const trie_t *trie = array_elt(config->tries, i); \ + const bool rev = array_elt(config->reverses, i); \ + if (trie_lookup(trie, rev ? reverse : normal)) { \ + sum += weight; \ + } \ + } \ } if (config->is_email) { LOOKUP(sender, sender);