aboutsummaryrefslogtreecommitdiff
path: root/c12/ex05/ft_list_push_strs.c
diff options
context:
space:
mode:
Diffstat (limited to 'c12/ex05/ft_list_push_strs.c')
-rw-r--r--c12/ex05/ft_list_push_strs.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/c12/ex05/ft_list_push_strs.c b/c12/ex05/ft_list_push_strs.c
index e56cd18..43c24a7 100644
--- a/c12/ex05/ft_list_push_strs.c
+++ b/c12/ex05/ft_list_push_strs.c
@@ -6,13 +6,14 @@
/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/07/09 17:18:23 by cacharle #+# #+# */
-/* Updated: 2019/07/17 18:34:23 by cacharle ### ########.fr */
+/* Updated: 2019/07/23 15:42:33 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
+#include <stdlib.h>
#include "ft_list.h"
-void list_push_front(t_list **begin_list, void *data)
+static void push_front(t_list **begin_list, void *data)
{
t_list *new_front;
@@ -21,14 +22,14 @@ void list_push_front(t_list **begin_list, void *data)
*begin_list = new_front;
}
-t_list *ft_list_push_strs(int size, char **strs)
+t_list *ft_list_push_strs(int size, char **strs)
{
- int i;
+ int i;
t_list *list;
list = NULL;
i = 0;
while (i < size)
- list_push_front(&list, strs[i++]);
+ push_front(&list, strs[i++]);
return (list);
}