diff --git a/slides/cours_11.md b/slides/cours_11.md index 63be99a02861c4f63cffedc3ed2dbb79dfd92213..3d73d9234bb87c8839bc5594d53b44a2253e8cbb 100644 --- a/slides/cours_11.md +++ b/slides/cours_11.md @@ -247,8 +247,8 @@ void stack_pop(stack *s, int *val) { ```C void stack_destroy(stack *s) { - while (!stack_is_empty(*s)) { - int val = stack_pop(s); + while (*s != NULL) { + stack_pop(s); } } ```