Skip to content

Commit

Permalink
Move &foo -> &foo[*] fix to the update section fix function
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Jan 25, 2018
1 parent 003833d commit 2351346
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/main/map.c
Expand Up @@ -294,32 +294,6 @@ int map_afrom_cp(TALLOC_CTX *ctx, vp_map_t **out, CONF_PAIR *cp,
}


/*
* Fixup LHS attribute references to change NUM_ANY to NUM_ALL.
*/
switch (map->lhs->type) {
case TMPL_TYPE_ATTR:
case TMPL_TYPE_LIST:
if (map->lhs->tmpl_num == NUM_ANY) map->lhs->tmpl_num = NUM_ALL;
break;

default:
break;
}

/*
* Fixup RHS attribute references to change NUM_ANY to NUM_ALL.
*/
switch (map->rhs->type) {
case TMPL_TYPE_ATTR:
case TMPL_TYPE_LIST:
if (map->rhs->tmpl_num == NUM_ANY) map->rhs->tmpl_num = NUM_ALL;
break;

default:
break;
}

MAP_VERIFY(map);

*out = map;
Expand Down
26 changes: 26 additions & 0 deletions src/main/unlang_compile.c
Expand Up @@ -1090,6 +1090,32 @@ int unlang_fixup_update(vp_map_t *map, UNUSED void *ctx)
}
}

/*
* Fixup LHS attribute references to change NUM_ANY to NUM_ALL.
*/
switch (map->lhs->type) {
case TMPL_TYPE_ATTR:
case TMPL_TYPE_LIST:
if (map->lhs->tmpl_num == NUM_ANY) map->lhs->tmpl_num = NUM_ALL;
break;

default:
break;
}

/*
* Fixup RHS attribute references to change NUM_ANY to NUM_ALL.
*/
switch (map->rhs->type) {
case TMPL_TYPE_ATTR:
case TMPL_TYPE_LIST:
if (map->rhs->tmpl_num == NUM_ANY) map->rhs->tmpl_num = NUM_ALL;
break;

default:
break;
}

/*
* Values used by unary operators should be literal ANY
*
Expand Down

0 comments on commit 2351346

Please sign in to comment.