Browse Source

remove the remaining coverity bugs

Julius Pfrommer 10 years ago
parent
commit
cfee99e5ad
2 changed files with 1 additions and 7 deletions
  1. 0 6
      src/client/ua_client.c
  2. 1 1
      src/ua_types.c

+ 0 - 6
src/client/ua_client.c

@@ -182,13 +182,7 @@ static UA_StatusCode SecureChannelHandshake(UA_Client *client) {
         reply = UA_Connection_completeMessages(&client->connection, reply);
     } while(reply.length < 0);
 
-    if(retval) {
-        UA_ByteString_deleteMembers(&reply);
-        return retval;
-    }
-
 	offset = 0;
-
 	UA_SecureConversationMessageHeader_decodeBinary(&reply, &offset, &messageHeader);
 	UA_AsymmetricAlgorithmSecurityHeader_decodeBinary(&reply, &offset, &asymHeader);
 	UA_SequenceHeader_decodeBinary(&reply, &offset, &seqHeader);

+ 1 - 1
src/ua_types.c

@@ -618,7 +618,7 @@ static UA_StatusCode testRangeWithVariant(const UA_Variant *v, const UA_NumericR
     size_t count = 1;
     if(range.dimensionsSize != dims_count)
         return UA_STATUSCODE_BADINTERNALERROR;
-    for(UA_Int32 i = 0; i < range.dimensionsSize; i++) {
+    for(UA_Int32 i = 0; i < dims_count; i++) {
         if(range.dimensions[i].min > range.dimensions[i].max)
             return UA_STATUSCODE_BADINDEXRANGEINVALID;
         if(range.dimensions[i].max > (UA_UInt32)*(dims+i))