From 6dd273764854a70f0dd6333e3d38fdfdf0c06122 Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Fri, 26 Jan 2024 12:42:48 +0000 Subject: [PATCH] - control.c: small code cleanup --- src/iec61850/server/mms_mapping/control.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/iec61850/server/mms_mapping/control.c b/src/iec61850/server/mms_mapping/control.c index de2b6f89..6fd42d01 100644 --- a/src/iec61850/server/mms_mapping/control.c +++ b/src/iec61850/server/mms_mapping/control.c @@ -1766,9 +1766,6 @@ Control_readAccessControlObject(MmsMapping* self, MmsDomain* domain, char* varia char* lnName = variableId; - if (lnName == NULL) - return NULL; - char* objectName = MmsMapping_getNextNameElement(separator + 1); if (objectName == NULL) @@ -1795,10 +1792,10 @@ Control_readAccessControlObject(MmsMapping* self, MmsDomain* domain, char* varia nextVarName = MmsMapping_getNextNameElement(varName); - if (nextVarName != NULL) + if (nextVarName) varName = nextVarName; - } while (nextVarName != NULL); + } while (nextVarName); if (foundVar == false) varName = NULL;