diff --git a/src/tty.c b/src/tty.c index aac148f..bd5f3f4 100644 --- a/src/tty.c +++ b/src/tty.c @@ -145,17 +145,11 @@ int connect_tty(void) /* Open tty device */ fd = open(option.tty_device, O_RDWR | O_NOCTTY ); if (fd < 0) - { - printf("\033[300DError: %s\n\033[300D", strerror(errno)); - exit(EXIT_FAILURE); - } + return EXIT_FAILURE; /* Make sure device is of tty type */ if (!isatty(fd)) - { - printf("\033[300DError: Not a tty device\n\033[300D"); - exit(EXIT_FAILURE); - } + return EXIT_FAILURE; /* Flush stale I/O data (if any) */ tcflush(fd, TCIOFLUSH);