From 353c59c2ae0d99d7fc90618ae3e3cc8e176b80da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl?= <35407363+EniumRaphael@users.noreply.github.com> Date: Thu, 14 Dec 2023 18:18:31 +0100 Subject: [PATCH] Add files via upload --- Makefile | 4 ++-- src/ft_printf.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index eecd968..7ad9938 100644 --- a/Makefile +++ b/Makefile @@ -6,12 +6,12 @@ # By: rparodi +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2023/11/12 11:05:05 by rparodi #+# #+# # -# Updated: 2023/11/24 16:24:21 by rparodi ### ########.fr # +# Updated: 2023/12/14 18:16:54 by raphael ### ########.fr # # # # **************************************************************************** # NAME=libftprintf.a -CC=cc +CC=clang CFLAGS=-Wall -Wextra -Werror RM=rm -f LIBFT = ./libft/ft_strdup.c ./libft/ft_strlcpy.c ./libft/ft_strlen.c diff --git a/src/ft_printf.c b/src/ft_printf.c index 6078dd0..940b566 100644 --- a/src/ft_printf.c +++ b/src/ft_printf.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/14 17:27:44 by rparodi #+# #+# */ -/* Updated: 2023/11/16 12:14:01 by rparodi ### ########.fr */ +/* Updated: 2023/12/14 18:17:22 by raphael ### ########.fr */ /* */ /* ************************************************************************** */ @@ -40,7 +40,6 @@ int ft_check_args(char c, va_list args, int *ret_value) int ft_printf(const char *s, ...) { size_t i; - int nb_flag; va_list args; char *str; int ret_value; @@ -49,12 +48,11 @@ int ft_printf(const char *s, ...) str = ft_strdup(s); va_start(args, s); i = 0; - nb_flag = 0; while (str[i]) { if (str[i] == '%') { - nb_flag += ft_check_args(str[i + 1], args, &ret_value); + ft_check_args(str[i + 1], args, &ret_value); i++; } else