return -1;
}
- tmpl_cast_set(vpt, cast);
+ if (tmpl_cast_set(vpt, cast) < 0) {
+ cf_log_perr(cp, "Failed setting tmpl type");
+ return -1;
+ }
/*
* Non-blocking xlat's
/*
* Force the RHS to be cast to whatever the LHS da is.
*/
- (void) tmpl_cast_set(map->rhs, tmpl_da(map->lhs)->type);
+ if ((tmpl_cast_set(map->rhs, tmpl_da(map->lhs)->type) < 0) ||
+ (tmpl_enumv_set(map->rhs, tmpl_da(map->rhs)) < 0)) {
+ cf_log_perr(map->ci, "Failed setting rhs type");
+ };
if (map->op != T_OP_CMP_EQ) {
cf_log_err(map->ci, "Must use '==' for comparisons with virtual attribute %s", map->lhs->name);