summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_printf_get_flags.c
diff options
context:
space:
mode:
Diffstat (limited to 'libft/src/ft_printf_get_flags.c')
-rw-r--r--libft/src/ft_printf_get_flags.c5
1 files changed, 2 insertions, 3 deletions
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);