diff options
author | Mikhail Lappo | 2017-03-23 11:07:39 -0500 |
---|---|---|
committer | Mikhail Lappo | 2017-03-23 11:07:39 -0500 |
commit | 8524faddd3ab954893312c249c277981e6c26d75 (patch) | |
tree | 965f7ca96e76297a82e92a0c633f5cb2ab3d2a63 /asn1_decoder.cpp | |
parent | 17e6d3f3bcd27aedc2ff8fe796ce90dddb04a714 (diff) | |
download | platform-bootable-recovery-8524faddd3ab954893312c249c277981e6c26d75.tar.gz platform-bootable-recovery-8524faddd3ab954893312c249c277981e6c26d75.tar.xz platform-bootable-recovery-8524faddd3ab954893312c249c277981e6c26d75.zip |
Checking unsigned variable less than zero
Unsinged variable can not be less than zero
Makes sense only to check if it is equal
Diffstat (limited to 'asn1_decoder.cpp')
-rw-r--r-- | asn1_decoder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/asn1_decoder.cpp b/asn1_decoder.cpp index a9dfccc5..285214f1 100644 --- a/asn1_decoder.cpp +++ b/asn1_decoder.cpp | |||
@@ -19,14 +19,14 @@ | |||
19 | #include <stdint.h> | 19 | #include <stdint.h> |
20 | 20 | ||
21 | int asn1_context::peek_byte() const { | 21 | int asn1_context::peek_byte() const { |
22 | if (length_ <= 0) { | 22 | if (length_ == 0) { |
23 | return -1; | 23 | return -1; |
24 | } | 24 | } |
25 | return *p_; | 25 | return *p_; |
26 | } | 26 | } |
27 | 27 | ||
28 | int asn1_context::get_byte() { | 28 | int asn1_context::get_byte() { |
29 | if (length_ <= 0) { | 29 | if (length_ == 0) { |
30 | return -1; | 30 | return -1; |
31 | } | 31 | } |
32 | 32 | ||