Browse Source

always use thread_local globals; prevent nesting exchangeBuffer()

Julius Pfrommer 7 years ago
parent
commit
5c2f1d8da5
1 changed files with 6 additions and 6 deletions
  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);