From 4f4651eea98e4330d28e36c6c87a292c84fe8107 Mon Sep 17 00:00:00 2001 From: gbrochar Date: Tue, 15 Oct 2024 16:17:25 +0200 Subject: [PATCH] opti(putstr): use one write only --- ft_putstr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ft_putstr.c b/ft_putstr.c index a21c751..7af2d77 100644 --- a/ft_putstr.c +++ b/ft_putstr.c @@ -6,7 +6,7 @@ /* By: gbrochar +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/11/27 18:23:12 by gbrochar #+# #+# */ -/* Updated: 2015/11/29 09:06:37 by gbrochar ### ########.fr */ +/* Updated: 2024/10/15 16:16:42 by gbrochar ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,5 @@ void ft_putstr(char const *s) { - while (*s) - write(1, s++, 1); + write(1, s, ft_strlen(s)); }