lock = false;
} else {
PARSE_CHECK(false, "illegal locking state %.*s",
- p - current, current);
+ (int)(p - current), current);
}
break;
reverse = false;
} else {
PARSE_CHECK(false, "illegal character order value %.*s",
- p - current, current);
+ (int)(p - current), current);
}
break;
weight = strtol(current, &next, 10);
PARSE_CHECK(next == p && weight >= 0 && weight <= 1024,
"illegal weight value %.*s",
- (p - current), current);
+ (int)(p - current), current);
break;
case 3:
lock = false;
} else {
PARSE_CHECK(false, "illegal locking state %.*s",
- p - current, current);
+ (int)(p - current), current);
}
break;
weight = strtol(current, &next, 10);
PARSE_CHECK(next == p && weight >= 0 && weight <= 1024,
"illegal weight value %.*s",
- (p - current), current);
+ (int)(p - current), current);
break;
case 2:
weight = strtol(current, &next, 10);
PARSE_CHECK(next == p && weight >= 0 && weight <= 1024,
"illegal weight value %.*s",
- (p - current), current);
+ (int)(p - current), current);
break;
case 1:
CASE(RECIPIENT, recipient, email);
#undef CASE
default:
- PARSE_CHECK(false, "unknown field %.*s", p - current, current);
+ PARSE_CHECK(false, "unknown field %.*s", (int)(p - current), current);
break;
}
if (!*p) {
PARSE_CHECK(config->is_email != config->is_hostname,
"matched field MUST be emails XOR hostnames");
- PARSE_CHECK(config->tries.len,
+ PARSE_CHECK(config->tries.len || config->host_offsets.len,
"no file parameter in the filter %s", filter->name);
filter->data = config;
return true;
if (config->match_ ## Flag) { \
const int len = m_strlen(query->Field); \
strlist_copy(normal, query->Field, len, false); \
- for (uint32_t i = 0 ; len > 0 && i < config->tries.len ; ++i) { \
+ for (uint32_t i = 0 ; len > 0 && i < config->host_offsets.len ; ++i) { \
const char *rbl = array_ptr(config->hosts, \
array_elt(config->host_offsets, i));\
const int weight = array_elt(config->host_weights, i); \