diff options
-rw-r--r-- | libft/src/get_next_line.c | 6 | ||||
-rw-r--r-- | libft/src/get_next_line_utils.c | 16 | ||||
-rw-r--r-- | src/ft_b_exit.c | 1 | ||||
-rw-r--r-- | src/ft_m_loop.c | 2 |
4 files changed, 13 insertions, 12 deletions
diff --git a/libft/src/get_next_line.c b/libft/src/get_next_line.c index ae64125..2b2ba80 100644 --- a/libft/src/get_next_line.c +++ b/libft/src/get_next_line.c @@ -36,7 +36,7 @@ static char while (++j < size2) dst[i + j] = s2[j]; dst[i + j] = '\0'; - ft_memdel((void**)&s1); + ft_memdel((void*)&s1); return (dst); } @@ -56,7 +56,7 @@ static int { *line = ft_strjoin_gnl(*line, buf); if ((size = read(fd, buf, BUFFER_SIZE)) == -1) - ft_memdel((void**)&buf); + ft_memdel((void*)&buf); if (size == -1) return (-1); buf[size] = 0; @@ -64,7 +64,7 @@ static int *line = ft_strjoin_gnl(*line, buf); if (end) curr->rest = ft_swap_gnl(end + 1, curr->rest); - ft_memdel((void**)&buf); + ft_memdel((void*)&buf); if (!end) return (0); return (size); diff --git a/libft/src/get_next_line_utils.c b/libft/src/get_next_line_utils.c index 42d5d3a..5181808 100644 --- a/libft/src/get_next_line_utils.c +++ b/libft/src/get_next_line_utils.c @@ -37,8 +37,8 @@ int if (prev->fd == fd) { scout = prev->next; - ft_memdel((void**)&prev->rest); - ft_memdel((void**)&prev); + ft_memdel((void*)&prev->rest); + ft_memdel((void*)&prev); *list = scout; return (0); } @@ -49,8 +49,8 @@ int scout = scout->next; } prev->next = scout->next; - ft_memdel((void**)&scout->rest); - ft_memdel((void**)&scout); + ft_memdel((void*)&scout->rest); + ft_memdel((void*)&scout); return (0); } @@ -60,7 +60,7 @@ t_gnl t_gnl *curr; t_gnl *new; - if (!(new = malloc(sizeof(*new)))) + if (!(new = (t_gnl*)malloc(sizeof(t_gnl)))) return (NULL); new->fd = fd; new->rest = 0; @@ -78,7 +78,7 @@ t_gnl if (curr->next == NULL) return (curr->next = new); } - ft_memdel((void**)&new); + ft_memdel((void*)&new); return (curr); } @@ -104,7 +104,7 @@ char char *dst; int i; - if (!(dst = malloc(ft_strlen_gnl(s1, 0) + 1))) + if (!(dst = (char*)malloc((ft_strlen_gnl(s1, 0) + 1) * sizeof(char)))) return (NULL); i = 0; while (s1[i]) @@ -113,6 +113,6 @@ char i++; } dst[i] = 0; - ft_memdel((void**)&free_ft); + ft_memdel((void*)&free_ft); return (dst); } diff --git a/src/ft_b_exit.c b/src/ft_b_exit.c index 44efa80..b9cb37b 100644 --- a/src/ft_b_exit.c +++ b/src/ft_b_exit.c @@ -34,6 +34,7 @@ uint8_t if (argc == 1) { ret = ft_atoi(args[0]); + /* TODO: non numeric args[0] */ } else { diff --git a/src/ft_m_loop.c b/src/ft_m_loop.c index d9fb4eb..a96eea2 100644 --- a/src/ft_m_loop.c +++ b/src/ft_m_loop.c @@ -38,7 +38,7 @@ uint8_t ft_e_lcom(msh); ft_lcom_clear(&msh->curr); /* TODO: GNL leak on "msh ~> exit" */ - /* TODO: redirect vvv */ + /* TODO: redirect vvv redirect */ /* "msh ~> echo qwe >/dev/null; echo *.vscode >> .gitignore" */ } else |