From 50f992d250ec2a67092dcde5d2b2ca603a5be6f1 Mon Sep 17 00:00:00 2001 From: Andreas Eckerstorfer <99019163+keba-estr@users.noreply.github.com> Date: Wed, 6 Sep 2023 15:31:53 +0200 Subject: [PATCH] refactor(server): Use macros for valueRank (#5996) --- src/server/ua_services_attribute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/ua_services_attribute.c b/src/server/ua_services_attribute.c index 65aaf5dd901..9f339393131 100644 --- a/src/server/ua_services_attribute.c +++ b/src/server/ua_services_attribute.c @@ -364,7 +364,7 @@ getStructureDefinition(const UA_DataType *type, UA_StructureDefinition *def) { for(size_t cnt = 0; cnt < def->fieldsSize; cnt++) { const UA_DataTypeMember *m = &type->members[cnt]; - def->fields[cnt].valueRank = (m->isArray) ? 1 : -1; + def->fields[cnt].valueRank = (m->isArray) ? UA_VALUERANK_ONE_DIMENSION : UA_VALUERANK_SCALAR; def->fields[cnt].arrayDimensions = NULL; def->fields[cnt].arrayDimensionsSize = 0; def->fields[cnt].name = UA_STRING((char *)(uintptr_t)m->memberName);