From 16dcd4da37e1d7c25680211895ab22982d376597 Mon Sep 17 00:00:00 2001 From: DTB Date: Fri, 26 Jul 2024 07:58:34 -0600 Subject: [PATCH] peek(1): more style fixes --- src/peek.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/peek.c b/src/peek.c index cde3ac4..965f2f6 100644 --- a/src/peek.c +++ b/src/peek.c @@ -85,7 +85,7 @@ int main(int argc, char *argv[]){ } } - { /* install signal handler */ + { /* Install signal handler */ /* There isn't a difference in functionality between the signal(2) and * sigaction(2) methods. sigaction(2) is vastly preferred for * portability but some configurations can only use signal(2). */ @@ -95,13 +95,13 @@ int main(int argc, char *argv[]){ struct sigaction act = { 0 }; act.sa_handler = restore_echo; - if(sigaction(SIGINT, &act, NULL) != 0) { perror(program_name); } + if (sigaction(SIGINT, &act, NULL) != 0) { perror(program_name); } #else - if(signal(SIGINT, restore_echo) == SIG_ERR) { perror(program_name); } + if (signal(SIGINT, restore_echo) == SIG_ERR) { perror(program_name); } #endif } - /* Banish terminal echo; this terminates when it fails, because this is the + /* Banish terminal echo; this terminates when it fails, because it's the * whole point of the program. */ { struct termios t; @@ -117,7 +117,7 @@ int main(int argc, char *argv[]){ int c; while ((c = fgetc(stdin)) != EOF) { - if(fputc(c, stdout) == EOF) { return ioerr(program_name); } + if (fputc(c, stdout) == EOF) { return ioerr(program_name); } } }