Explorar o código

fix a cppcheck issue for unreachable code

Julius Pfrommer %!s(int64=8) %!d(string=hai) anos
pai
achega
cf7053522d
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/server/ua_services_attribute.c

+ 2 - 1
src/server/ua_services_attribute.c

@@ -856,8 +856,9 @@ void Service_Write(UA_Server *server, UA_Session *session, const UA_WriteRequest
 
 UA_StatusCode UA_Server_write(UA_Server *server, const UA_WriteValue *value) {
     UA_RCU_LOCK();
-    return Service_Write_single(server, &adminSession, value);
+    UA_StatusCode retval = Service_Write_single(server, &adminSession, value);
     UA_RCU_UNLOCK();
+    return retval;
 }
 
 UA_StatusCode