Code cosmetics: reduce the amount of cppcheck warnings

This commit is contained in:
Felipe Zimmerle
2015-08-12 15:22:00 -03:00
parent 21400ba454
commit d5fe21ce3c
24 changed files with 49 additions and 56 deletions

View File

@@ -27,7 +27,7 @@ int ValidateUrlEncoding::validate_url_encoding(const char *input,
uint64_t input_length) {
int i;
if ((input == NULL) || (input_length < 0)) {
if ((input == NULL) || (input_length <= 0)) {
return -1;
}

View File

@@ -70,7 +70,6 @@ bool VerifyCC::evaluate(Assay *assay, const std::string &i) {
int offset = 0;
bool is_cc = false;
int target_length = i.length();
const char *target = i.c_str();
for (offset = 0; offset < target_length; offset++) {
std::string shiftedString(i, offset, i.length() - offset);