summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 28f897f..e4b0cbc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -451,7 +451,10 @@ static int print_setup_as_args(setup_t *setup, int wait)
if (r < 0)
goto _out_video;
- (void) fgets(buf, sizeof(buf), stdin);
+ if (fgets(buf, sizeof(buf), stdin) == NULL) {
+ r = -EBADF;
+ goto _out_video;
+ }
}
_out_video:
© All Rights Reserved