diff --git a/C_08/git/ex04/ft_strs_to_tab.c b/C_08/git/ex04/ft_strs_to_tab.c index c838f96..a6de573 100644 --- a/C_08/git/ex04/ft_strs_to_tab.c +++ b/C_08/git/ex04/ft_strs_to_tab.c @@ -46,7 +46,7 @@ struct s_stock_str *ft_strs_to_tab(int ac, char **av) t_stock_str *result; int i; - result = (t_stock_str *) malloc((ac + 1) * sizeof(result)); + result = malloc((ac + 1) * sizeof(t_stock_str)); if (result == NULL) return (NULL); i = 0; diff --git a/C_08/git/ex05/main.c b/C_08/git/ex05/main.c index 22126a6..f017036 100644 --- a/C_08/git/ex05/main.c +++ b/C_08/git/ex05/main.c @@ -49,7 +49,7 @@ struct s_stock_str *ft_strs_to_tab(int ac, char **av) t_stock_str *result; int i; - result = (t_stock_str *) malloc((ac + 1) * sizeof(result)); + result = malloc((ac + 1) * sizeof(t_stock_str)); if (result == NULL) return (NULL); i = 0; @@ -66,7 +66,7 @@ struct s_stock_str *ft_strs_to_tab(int ac, char **av) return (result); } -int main(int argc, char *argv[]) +int main(int argc, char **argv) { t_stock_str *par; int i;