when we free it, we know it's not NULL
This commit is contained in:
parent
834d87173a
commit
82ea09e146
1 changed files with 5 additions and 7 deletions
|
@ -21,7 +21,6 @@ str_array * str_array_create(int cap) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void str_array_free(str_array *l) {
|
void str_array_free(str_array *l) {
|
||||||
if (l) {
|
|
||||||
for ( int i = 0; i < l->len ; i++ ) {
|
for ( int i = 0; i < l->len ; i++ ) {
|
||||||
char * t = l->tokens[ i ];
|
char * t = l->tokens[ i ];
|
||||||
if (t) {
|
if (t) {
|
||||||
|
@ -29,7 +28,6 @@ void str_array_free(str_array *l) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
zfree(l);
|
zfree(l);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool str_array_is_full(str_array * l) {
|
bool str_array_is_full(str_array * l) {
|
||||||
|
|
Loading…
Reference in a new issue