diff --git a/src/peek.c b/src/peek.c index 965f2f6..f9fb6f8 100644 --- a/src/peek.c +++ b/src/peek.c @@ -55,6 +55,7 @@ ioerr(char *argv0) { static int usage(char *argv0) { (void)fprintf(stderr, "Usage: %s [-i]\n", argv0); + return EX_USAGE; } @@ -106,10 +107,10 @@ int main(int argc, char *argv[]){ { struct termios t; - if (tcgetattr(STDIN_FILENO, &t) != 0) { return ioerror(program_name); } + if (tcgetattr(STDIN_FILENO, &t) != 0) { return ioerr(program_name); } t.c_lflag ^= ECHO; if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &t) != 0) { - return ioerror(program_name); + return ioerr(program_name); } }