Check setvbuf return value
PATCH 1/10 Check setvbuf return value
Check for setvbuf failure.
Signed-off-by Eric Sandeen <[email protected]>
---
blktrace.c +4 -1
@@ -2178,7 +2178,10 @@ static int handle_args(int argc, char *argv[]) piped_output =1 ; handle_pfds = handle_pfds_entries; pfp = stdout; -setvbuf (pfp,NULL , _IONBF,0 ); +if (setvbuf (pfp,NULL , _IONBF,0 )) { +perror ("setvbuf stdout" ); +return 1 ; + } }else handle_pfds = handle_pfds_file;return 0 ;