mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-19 12:52:37 +00:00
use static_cast
This commit is contained in:
parent
61c1fd761f
commit
3478a3385d
@ -268,7 +268,7 @@ private:
|
||||
reinterpret_cast<unsigned char*>(ciphertext_ref), &final_output_len) != 1)
|
||||
throw DB::Exception("Failed to fetch ciphertext", DB::ErrorCodes::DATA_ENCRYPTION_ERROR);
|
||||
|
||||
if (output_len < 0 || final_output_len < 0 || size_t(output_len + final_output_len) != bytes)
|
||||
if (output_len < 0 || final_output_len < 0 || static_cast<size_t>(output_len + final_output_len) != bytes)
|
||||
throw DB::Exception("Only part of the data was encrypted", DB::ErrorCodes::DATA_ENCRYPTION_ERROR);
|
||||
|
||||
return ciphertext;
|
||||
@ -349,7 +349,7 @@ private:
|
||||
reinterpret_cast<unsigned char*>(to), &final_output_len) != 1)
|
||||
throw DB::Exception("Failed to fetch plaintext", DB::ErrorCodes::DATA_ENCRYPTION_ERROR);
|
||||
|
||||
if (output_len < 0 || final_output_len < 0 || size_t(output_len + final_output_len) != bytes)
|
||||
if (output_len < 0 || final_output_len < 0 || static_cast<size_t>(output_len + final_output_len) != bytes)
|
||||
throw DB::Exception("Only part of the data was decrypted", DB::ErrorCodes::DATA_ENCRYPTION_ERROR);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user