瀏覽代碼

always use thread_local globals; prevent nesting exchangeBuffer()

Julius Pfrommer 7 年之前
父節點
當前提交
5c2f1d8da5
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/ua_types_encoding_binary.c

+ 6 - 6
src/ua_types_encoding_binary.c

@@ -1198,12 +1198,12 @@ static UA_StatusCode
 DataValue_encodeBinary(UA_DataValue const *src, const UA_DataType *_) {
     /* Set up the encoding mask */
     UA_Byte encodingMask = (UA_Byte)
-        ((UA_Byte)src->hasValue |
-        ((UA_Byte)src->hasStatus << 1) |
-        ((UA_Byte)src->hasSourceTimestamp << 2) |
-        ((UA_Byte)src->hasServerTimestamp << 3) |
-        ((UA_Byte)src->hasSourcePicoseconds << 4) |
-        ((UA_Byte)src->hasServerPicoseconds << 5));
+        (((UA_Byte)src->hasValue) |
+         ((UA_Byte)src->hasStatus << 1) |
+         ((UA_Byte)src->hasSourceTimestamp << 2) |
+         ((UA_Byte)src->hasServerTimestamp << 3) |
+         ((UA_Byte)src->hasSourcePicoseconds << 4) |
+         ((UA_Byte)src->hasServerPicoseconds << 5));
 
     /* Encode the encoding byte */
     UA_StatusCode retval = Byte_encodeBinary(&encodingMask, NULL);