Skip to content

Commit

Permalink
UNICHARMAP: Remove comparison which is always false
Browse files Browse the repository at this point in the history
Warning from LGTM:

    Comparison is always false because index <= 0 and 1 <= length.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Oct 8, 2018
1 parent 3ae765e commit 30b75cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ccutil/unicharmap.cpp
Expand Up @@ -83,7 +83,7 @@ bool UNICHARMAP::contains(const char* const unichar_repr,
if (unichar_repr == nullptr || *unichar_repr == '\0') return false;
if (length <= 0 || length > UNICHAR_LEN) return false;
int index = 0;
if (index >= length || unichar_repr[index] == '\0') return false;
if (unichar_repr[index] == '\0') return false;
UNICHARMAP_NODE* current_nodes = nodes;

while (current_nodes != nullptr && index + 1 < length &&
Expand Down

0 comments on commit 30b75cf

Please sign in to comment.