Skip to content

Commit

Permalink
add free
Browse files Browse the repository at this point in the history
  • Loading branch information
yashiropriv committed May 17, 2024
1 parent d57c132 commit 674dc6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions srcs/ft_print_unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: ryyashir <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/05 03:35:14 by ryyashir #+# #+# */
/* Updated: 2024/05/16 19:07:31 by ryyashir ### ########.fr */
/* Updated: 2024/05/17 13:02:06 by ryyashir ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -34,9 +34,9 @@ char *ft_uitoa(unsigned int c)
int len;

len = ft_uni_num_len(c);
str = (char *)malloc(sizeof(char) * (len + 1));
str = (char *)malloc(sizeof(char) * (len + 1));
if (!str)
return (0);
return (NULL);
str[len] = '\0';
if (c == 0)
*str = '0';
Expand Down
8 changes: 4 additions & 4 deletions srcs/ft_printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: ryyashir <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/05 05:34:45 by ryyashir #+# #+# */
/* Updated: 2024/05/16 19:42:03 by ryyashir ### ########.fr */
/* Updated: 2024/05/17 14:46:58 by ryyashir ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -73,11 +73,11 @@ int ft_printf(const char *format, ...)
// {
// int a;
// int b;
// a = ft_printf(0);
// a = ft_printf("%s" , (void *)NULL);
// printf("%d\n" , a);

// b = printf(0);
// b = printf("%s" , (void *)NULL);
// printf("%d\n" , b);
// return (0);
// }
// gcc -Iinclude -o test srcs/ft_printf.c Libft/libft.a libftprintf.a
// gcc -Iinclude -o test srcs/ft_printf.c Libft/libft.a libftprintf.a

0 comments on commit 674dc6c

Please sign in to comment.