Fix various errors in list_destroy()
As reported by cppcheck: src/list.c:45:8: style: Redundant initialization for 'data'. The initialized value is overwritten before it is read. [redundantInitialization] data = NULL; ^ src/list.c:43:15: note: data is initialized void * data = list_pop_front(list); ^ src/list.c:45:8: note: data is overwritten data = NULL; ^
This commit is contained in:
parent
f24b8bd3a8
commit
17088c631f
1 changed files with 1 additions and 3 deletions
|
@ -40,9 +40,7 @@ void list_destroy(List_t * list){
|
|||
// sans détruire les données dedans ?
|
||||
while(!list_is_empty(list)){
|
||||
pDEBUG("destroying front cell\n");
|
||||
void * data = list_pop_front(list);
|
||||
pDEBUG("set data to NULL\n");
|
||||
data = NULL;
|
||||
list_pop_front(list);
|
||||
}
|
||||
free(list);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue