From: Alan T. DeKok Date: Thu, 28 Jul 2022 14:48:54 +0000 (-0400) Subject: don't bother checking operators here. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37e98316908890bf354d4e29b8eb6485f26868f5;p=thirdparty%2Ffreeradius-server.git don't bother checking operators here. The fr_edit_list_apply_list_assignment() function will check it anyways. Not checking it here means that we can later add new operators without changing this code. --- diff --git a/src/lib/unlang/edit.c b/src/lib/unlang/edit.c index 1e92f1cecc0..1fdb2dfe049 100644 --- a/src/lib/unlang/edit.c +++ b/src/lib/unlang/edit.c @@ -776,18 +776,6 @@ redo: fr_pair_t *parent; request_t *other = request; - /* - * Get the list. - * - * When we assign via :=, we create the LHS vp if it doesn't exist. The - * same goes for =, <=, and |=. Other operators require something on the - * LHS, so they will fail if the LHS doesn't exist. - */ - if ((map->op != T_OP_SET) && (map->op != T_OP_EQ) && (map->op != T_OP_LE) && (map->op != T_OP_OR_EQ)) { - REDEBUG("Invalid operator %s for list", fr_tokens[map->op]); - goto error; - } - fr_assert(!tmpl_is_list(current->lhs.vpt)); /*