浏览代码

fix a cppcheck issue for unreachable code

Julius Pfrommer 8 年之前
父节点
当前提交
cf7053522d
共有 1 个文件被更改,包括 2 次插入1 次删除
  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_StatusCode UA_Server_write(UA_Server *server, const UA_WriteValue *value) {
     UA_RCU_LOCK();
     UA_RCU_LOCK();
-    return Service_Write_single(server, &adminSession, value);
+    UA_StatusCode retval = Service_Write_single(server, &adminSession, value);
     UA_RCU_UNLOCK();
     UA_RCU_UNLOCK();
+    return retval;
 }
 }
 
 
 UA_StatusCode
 UA_StatusCode