Parcourir la source

Fix warning of shadowed newEntry

Stefan Profanter il y a 7 ans
Parent
commit
c86c8e833f
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      plugins/ua_nodestore_default.c

+ 4 - 4
plugins/ua_nodestore_default.c

@@ -378,16 +378,16 @@ UA_NodeMap_replaceNode(void *context, UA_Node *node) {
         END_CRITSECT(ns);
         return UA_STATUSCODE_BADNODEIDUNKNOWN;
     }
-    UA_NodeMapEntry *newEntry = container_of(node, UA_NodeMapEntry, node);
-    if(*slot != newEntry->orig) {
+    UA_NodeMapEntry *newEntryContainer = container_of(node, UA_NodeMapEntry, node);
+    if(*slot != newEntryContainer->orig) {
         /* The node was updated since the copy was made */
-        deleteEntry(newEntry);
+        deleteEntry(newEntryContainer);
         END_CRITSECT(ns);
         return UA_STATUSCODE_BADINTERNALERROR;
     }
     (*slot)->deleted = true;
     cleanupEntry(*slot);
-    *slot = newEntry;
+    *slot = newEntryContainer;
     END_CRITSECT(ns);
     return UA_STATUSCODE_GOOD;
 }