[ovs-dev] [PATCH ovn v4 2/5] Don't check for writeability of rhs during assignment.

Mark Michelson mmichels at redhat.com
Tue Jul 28 20:16:23 UTC 2020


The only condition under which the right-hand side of an assignment
needs to be checked for writeability is if it is an exchange (<->)
operation.

Signed-off-by: Mark Michelson <mmichels at redhat.com>
---
 lib/actions.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/actions.c b/lib/actions.c
index e14907e3d..b423995c3 100644
--- a/lib/actions.c
+++ b/lib/actions.c
@@ -515,7 +515,7 @@ parse_assignment_action(struct action_context *ctx, bool exchange,
 
     char *error = expr_type_check(lhs, lhs->n_bits, true);
     if (!error) {
-        error = expr_type_check(&rhs, rhs.n_bits, true);
+        error = expr_type_check(&rhs, rhs.n_bits, exchange);
     }
     if (error) {
         lexer_error(ctx->lexer, "%s", error);
-- 
2.25.4



More information about the dev mailing list