From 4ede84d4ab98c75ed8655607fe64c205b79ed986 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 29 Sep 2020 19:18:30 +0200 Subject: libft norm in progress --- libft/src/ft_printf_get_flags.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libft/src/ft_printf_get_flags.c') diff --git a/libft/src/ft_printf_get_flags.c b/libft/src/ft_printf_get_flags.c index ca49206..e6ba0de 100644 --- a/libft/src/ft_printf_get_flags.c +++ b/libft/src/ft_printf_get_flags.c @@ -21,8 +21,7 @@ ** Also puts actual conv into pflist->actconv */ -char - *ft_printf_get_flags(const char *format, int pos, t_printflist *pflist) +char *ft_printf_get_flags(const char *format, int pos, t_printflist *pflist) { int i; char *nstr; @@ -32,7 +31,7 @@ char while (!ft_ischarset(FT_PRINTF_CONV_CHARSET, *(format + pos + i + 1)) && *(format + pos + i + 1)) i++; - if (!(fullflag = (char*)malloc((i + 1) * sizeof(char)))) + if ((fullflag = (char*)malloc((i + 1) * sizeof(char))) == NULL) return (NULL); ft_memcpy(fullflag, nstr = ft_substr(format, pos + 1, i), i); ft_memdel((void**)&nstr); -- cgit v1.2.3