Skip to content

Commit

Permalink
Checking unsigned variable less than zero
Browse files Browse the repository at this point in the history
Unsinged variable can not be less than zero
Makes sense only to check if it is equal
  • Loading branch information
miklelappo committed Mar 23, 2017
1 parent 17e6d3f commit 8524fad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asn1_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
#include <stdint.h>

int asn1_context::peek_byte() const {
if (length_ <= 0) {
if (length_ == 0) {
return -1;
}
return *p_;
}

int asn1_context::get_byte() {
if (length_ <= 0) {
if (length_ == 0) {
return -1;
}

Expand Down

0 comments on commit 8524fad

Please sign in to comment.