diff options
author | Jack Lloyd <[email protected]> | 2017-10-06 21:09:01 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-10-06 21:09:01 -0400 |
commit | 9e3dca25c7197c39a815ce39da670a4232212a45 (patch) | |
tree | 06282ebe4c88e0f840320cf8b8584eab8550fec2 /src/lib/asn1/der_enc.cpp | |
parent | aff93b716eda9d10be9f02e4b436b672510ab179 (diff) |
Address some bool/int conversion warnings from Sonar
Nothing major but probably good to clean these up.
Diffstat (limited to 'src/lib/asn1/der_enc.cpp')
-rw-r--r-- | src/lib/asn1/der_enc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/asn1/der_enc.cpp b/src/lib/asn1/der_enc.cpp index e791bce8c..28a9bbc9a 100644 --- a/src/lib/asn1/der_enc.cpp +++ b/src/lib/asn1/der_enc.cpp @@ -290,7 +290,7 @@ DER_Encoder& DER_Encoder::encode(const BigInt& n, if(n == 0) return add_object(type_tag, class_tag, 0); - bool extra_zero = (n.bits() % 8 == 0); + const size_t extra_zero = (n.bits() % 8 == 0) ? 1 : 0; secure_vector<uint8_t> contents(extra_zero + n.bytes()); BigInt::encode(&contents[extra_zero], n); if(n < 0) |