From ecfe64b40b54820cb5a676cf65cdcb858843d4d2 Mon Sep 17 00:00:00 2001 From: Kristof Szabados <Kristof.Szabados@ericsson.com> Date: Sun, 18 Nov 2018 15:41:56 +0100 Subject: [PATCH] minor simplification. Signed-off-by: Kristof Szabados <Kristof.Szabados@ericsson.com> --- compiler2/record_of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler2/record_of.c b/compiler2/record_of.c index 178b767dc..1825ce45c 100644 --- a/compiler2/record_of.c +++ b/compiler2/record_of.c @@ -324,8 +324,8 @@ void defRecordOfClass1(const struct_of_def *sdef, output_struct *output) "if (index_value >= val_ptr->n_elements) TTCN_error(\"Index overflow in " "a value of type %s: The index is %%d, but the value has only %%d " "elements.\", index_value, val_ptr->n_elements);\n" - "return (val_ptr->value_elements[index_value] != NULL) ?\n" - "*val_ptr->value_elements[index_value] : UNBOUND_ELEM;\n" + "return (val_ptr->value_elements[index_value] == NULL) ?\n" + "UNBOUND_ELEM : *val_ptr->value_elements[index_value];\n" "}\n\n", type, name, dispname, dispname, dispname); def = mputprintf(def, "const %s& operator[](const INTEGER& index_value) " -- GitLab