aboutsummaryrefslogtreecommitdiff
path: root/helper.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-02-21 01:15:37 +0100
committerCharles <sircharlesaze@gmail.com>2020-02-21 01:29:02 +0100
commit37c4d2ce0edf907b4c76435ee75c23c4444b3bb9 (patch)
tree8345a5d5b2df886a4cfb625a182811a1b1e2b8f1 /helper.c
parent3caf40fa017f974258444103e6dfe9d1420d2a08 (diff)
downloadft_printf_test-37c4d2ce0edf907b4c76435ee75c23c4444b3bb9.tar.gz
ft_printf_test-37c4d2ce0edf907b4c76435ee75c23c4444b3bb9.tar.bz2
ft_printf_test-37c4d2ce0edf907b4c76435ee75c23c4444b3bb9.zip
Fixing buf not zeroed before test
Diffstat (limited to 'helper.c')
-rw-r--r--helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/helper.c b/helper.c
index d6ae531..3fd496f 100644
--- a/helper.c
+++ b/helper.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/06 18:13:38 by cacharle #+# #+# */
-/* Updated: 2020/02/06 18:13:39 by cacharle ### ########.fr */
+/* Updated: 2020/02/21 01:14:37 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -47,7 +47,7 @@ void test_tear_down(void)
char *read_stdout_buf(void)
{
fflush(stdout);
- buf[0] = 0;
+ bzero(buf, BUF_SIZE + 1);
int ret = read(pipefd[0], buf, BUF_SIZE);
if (ret != -1)
buf[ret] = '\0';