Commit 62d4b81a833477e596c3ec264f83c08901eeea5b

Authored by KMG
2 parents 87d7e8fb dfffff27
Exists in master and in 2 other branches v2, v3

Merged in dachary/gf-complete/wip-static-code-analysis (pull request #24)

static code analysis fixes
Showing 2 changed files with 1 additions and 2 deletions   Show diff stats
src/gf.c
... ... @@ -392,7 +392,7 @@ int gf_error_check(int w, int mult_type, int region_type, int divide_type,
392 392 if (mult_type == GF_MULT_COMPOSITE) {
393 393 if (w != 8 && w != 16 && w != 32
394 394 && w != 64 && w != 128) { _gf_errno = GF_E_COMP__W; return 0; }
395   - if ((poly >> (w/2)) != 0) { _gf_errno = GF_E_COMP_PP; return 0; }
  395 + if (w < 128 && (poly >> (w/2)) != 0) { _gf_errno = GF_E_COMP_PP; return 0; }
396 396 if (divide_type != GF_DIVIDE_DEFAULT) { _gf_errno = GF_E_DIVCOMP; return 0; }
397 397 if (arg1 != 2) { _gf_errno = GF_E_COMP_A2; return 0; }
398 398 if (rsse || rnosse) { _gf_errno = GF_E_COMP_SS; return 0; }
... ...
src/gf_method.c
... ... @@ -107,7 +107,6 @@ int create_gf_from_argv(gf_t *gf, int w, int argc, char **argv, int starting)
107 107 return 0;
108 108 }
109 109 } else {
110   - if (base != NULL) gf_free(base, 1);
111 110 _gf_errno = GF_E_UNKNOWN;
112 111 return 0;
113 112 }
... ...