From f15add0abb0ad72fd8970b619dab3e3cfe2f053c Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 22 Apr 2018 02:35:13 +0200 Subject: [PATCH] Don't dereference FILE* This is undefined behavour and doesn't work on musl --- src/grep_proc.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/grep_proc.cc b/src/grep_proc.cc index cba548e1..8e4fd50e 100644 --- a/src/grep_proc.cc +++ b/src/grep_proc.cc @@ -159,7 +159,6 @@ void grep_proc::child_loop(void) char outbuf[BUFSIZ * 2]; string line_value; - *stdout = *(fdopen(STDOUT_FILENO, "w")); /* Make sure buffering is on, not sure of the state in the parent. */ if (setvbuf(stdout, outbuf, _IOFBF, BUFSIZ * 2) < 0) { perror("setvbuf");