Skip to content

Commit

Permalink
move cppcheck-supress to the correct location
Browse files Browse the repository at this point in the history
  • Loading branch information
camshaft committed Jan 12, 2022
1 parent 6037eb0 commit 17d9d2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/s2n_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,13 @@ S2N_RESULT s2n_map_lookup(const struct s2n_map *map, struct s2n_blob *key, struc

S2N_RESULT s2n_map_free(struct s2n_map *map)
{
/* cppcheck has a false positive warning for checking the pointer here */
/* cppcheck-suppress nullPointerRedundantCheck */
if (map == NULL) {
return S2N_RESULT_OK;
}

/* Free the keys and values */
/* cppcheck has a false positive warning for checking the pointer here */
/* cppcheck-suppress nullPointerRedundantCheck */
for (uint32_t i = 0; i < map->capacity; i++) {
if (map->table[i].key.size) {
RESULT_GUARD_POSIX(s2n_free(&map->table[i].key));
Expand Down

0 comments on commit 17d9d2a

Please sign in to comment.