Perform even more style changes.
- Remove unneeded whitespace for function calls. - Add empty line at the top of functions without local variables. - Change while (1) to for (;;). MFC after: 1 week
This commit is contained in:
parent
f10070765a
commit
0ba64b2731
@ -134,12 +134,14 @@ set_tty(void)
|
||||
static void
|
||||
unset_tty(void)
|
||||
{
|
||||
|
||||
tcsetattr(std_in, TCSANOW, &otty);
|
||||
}
|
||||
|
||||
static void
|
||||
fatal(int error, const char *buf)
|
||||
{
|
||||
|
||||
unset_tty();
|
||||
if (buf)
|
||||
errx(error, "fatal: %s", buf);
|
||||
@ -170,6 +172,7 @@ open_snp(void)
|
||||
static void
|
||||
cleanup(int signo __unused)
|
||||
{
|
||||
|
||||
if (opt_timestamp)
|
||||
timestamp("Logging Exited.");
|
||||
close(snp_io);
|
||||
@ -180,6 +183,7 @@ cleanup(int signo __unused)
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
fprintf(stderr, "usage: watch [-ciotnW] [tty name]\n");
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
@ -344,7 +348,7 @@ main(int ac, char *av[])
|
||||
|
||||
FD_ZERO(&fd_s);
|
||||
|
||||
while (1) {
|
||||
for (;;) {
|
||||
if (opt_interactive)
|
||||
FD_SET(std_in, &fd_s);
|
||||
FD_SET(snp_io, &fd_s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user