Kaynağa Gözat

clean issues from clang-tidy

Julius Pfrommer 8 yıl önce
ebeveyn
işleme
f0097d26f3

+ 1 - 1
src/server/ua_server_internal.h

@@ -258,6 +258,6 @@ void Service_Call_single(UA_Server *server, UA_Session *session,
                          UA_CallMethodResult *result);
 
 /* Periodic task to clean up the discovery registry */
-void UA_Discovery_cleanupTimedOut(UA_Server *server, UA_DateTime now);
+void UA_Discovery_cleanupTimedOut(UA_Server *server, UA_DateTime nowMonotonic);
 
 #endif /* UA_SERVER_INTERNAL_H_ */

+ 8 - 7
src/ua_types_encoding_binary.c

@@ -50,8 +50,8 @@ extern const UA_calcSizeBinarySignature calcSizeBinaryJumpTable[UA_BUILTIN_TYPES
 
 /* Pointer to custom datatypes in the server or client. Set inside
  * UA_decodeBinary */
-UA_THREAD_LOCAL size_t customTypesSize;
-UA_THREAD_LOCAL const UA_DataType *customTypes;
+UA_THREAD_LOCAL size_t customTypesArraySize;
+UA_THREAD_LOCAL const UA_DataType *customTypesArray;
 
 /* We give pointers to the current position and the last position in the buffer
  * instead of a string with an offset. */
@@ -774,8 +774,8 @@ findDataTypeByBinary(const UA_NodeId *typeId, const UA_DataType **findtype) {
     const UA_DataType *types = UA_TYPES;
     size_t typesSize = UA_TYPES_COUNT;
     if(typeId->namespaceIndex != 0) {
-        types = customTypes;
-        typesSize = customTypesSize;
+        types = customTypesArray;
+        typesSize = customTypesArraySize;
     }
     for(size_t i = 0; i < typesSize; ++i) {
         if(types[i].binaryEncodingId == typeId->identifier.numeric) {
@@ -1315,14 +1315,15 @@ UA_decodeBinaryInternal(void *dst, const UA_DataType *type) {
 
 UA_StatusCode
 UA_decodeBinary(const UA_ByteString *src, size_t *offset, void *dst,
-                const UA_DataType *type, size_t cTS, const UA_DataType *cT) {
+                const UA_DataType *type, size_t customTypesSize,
+                const UA_DataType *customTypes) {
     /* Initialize the destination */
     memset(dst, 0, type->memSize);
 
     /* Store the pointers to the custom datatypes. They might be needed during
      * decoding of variants. */
-    customTypesSize = cTS;
-    customTypes = cT;
+    customTypesArraySize = customTypesSize;
+    customTypesArray = customTypes;
 
     /* Set the (thread-local) position and end pointers to save function
      * arguments */