RDEBUG3("Got value : %pV", fr_box_strvalue_len(value->str, value->len));
MEM(map = talloc_zero(ctx, map_t));
- slen = tmpl_afrom_attr_str(map, NULL, &map->lhs, key->str, &(tmpl_rules_t){ .dict_def = request->dict });
- if (slen < 0) {
+ slen = tmpl_afrom_attr_str(map, NULL, &map->lhs, key->str,
+ &(tmpl_rules_t){ .dict_def = request->dict });
+ if (slen <= 0) {
REMARKER(key->str, -slen, "%s", fr_strerror());
goto error;
}
/*
* These never change, so do it once on instantiation
*/
- if (tmpl_afrom_attr_str(driver, NULL, &driver->created_attr, "&Cache-Created", NULL) < 0) {
+ if (tmpl_afrom_attr_str(driver, NULL, &driver->created_attr, "&Cache-Created", NULL) <= 0) {
ERROR("Cache-Created attribute not defined");
return -1;
}
- if (tmpl_afrom_attr_str(driver, NULL, &driver->expires_attr, "&Cache-Expires", NULL) < 0) {
+ if (tmpl_afrom_attr_str(driver, NULL, &driver->expires_attr, "&Cache-Expires", NULL) <= 0) {
ERROR("Cache-Expires attribute not defined");
return -1;
}