Skip to content

Commit

Permalink
refactor(server): Use macros for valueRank (open62541#5996)
Browse files Browse the repository at this point in the history
  • Loading branch information
keba-estr authored Sep 6, 2023
1 parent 0e2cbab commit 50f992d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/ua_services_attribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 50f992d

Please sign in to comment.