fix: coverage tests and hash_map_free on NULL
This commit is contained in:
parent
834b6585c5
commit
828b0e8be3
2 changed files with 2 additions and 2 deletions
|
|
@ -36,13 +36,13 @@ check_PROGRAMS = testsuite
|
||||||
|
|
||||||
testsuite_SOURCES = ../tests/unit/utils/utils_tests.c \
|
testsuite_SOURCES = ../tests/unit/utils/utils_tests.c \
|
||||||
../tests/unit/expansion/parse_var.c \
|
../tests/unit/expansion/parse_var.c \
|
||||||
../tests/unit/io_backend/io_backend.c \
|
|
||||||
../tests/unit/utils/args.c \
|
../tests/unit/utils/args.c \
|
||||||
../tests/unit/utils/hash_map.c \
|
../tests/unit/utils/hash_map.c \
|
||||||
../tests/unit/utils/insert_into.c
|
../tests/unit/utils/insert_into.c
|
||||||
|
|
||||||
# ../tests/unit/lexer/lexer_tests.c
|
# ../tests/unit/lexer/lexer_tests.c
|
||||||
# ../tests/unit/expansion/expand.c
|
# ../tests/unit/expansion/expand.c
|
||||||
|
# ../tests/unit/io_backend/io_backend.c
|
||||||
|
|
||||||
testsuite_CPPFLAGS = $(42sh_CPPFLAGS)
|
testsuite_CPPFLAGS = $(42sh_CPPFLAGS)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,8 +116,8 @@ void hash_map_free(struct hash_map **hash_map)
|
||||||
}
|
}
|
||||||
free((*hash_map)->data);
|
free((*hash_map)->data);
|
||||||
free(*hash_map);
|
free(*hash_map);
|
||||||
|
*hash_map = NULL;
|
||||||
}
|
}
|
||||||
*hash_map = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void hash_map_foreach(struct hash_map *hash_map,
|
void hash_map_foreach(struct hash_map *hash_map,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue