From: Siraaj Khandkar Date: Sun, 15 Mar 2020 06:26:12 +0000 (-0400) Subject: Use braces in elses which follow multi-statement ifs X-Git-Url: https://git.xandkar.net/?p=khatus.git;a=commitdiff_plain;h=574a4bff980c2e56c603c81e8c2773e42b4baf71 Use braces in elses which follow multi-statement ifs --- diff --git a/x5/khatus.c b/x5/khatus.c index ee96d60..db800ea 100644 --- a/x5/khatus.c +++ b/x5/khatus.c @@ -325,9 +325,10 @@ fifo_read_one(Fifo *f, char *buf, Config *cfg) if (current == -1) { error("Failed to read: \"%s\". Error: %s\n", f->name, strerror(errno)); fifo_read_error(f, buf); - } else + } else { while (total++ < f->width) *b++ = ' '; + } /* TODO Record timestamp read */ close(f->fd); f->fd = -1; @@ -506,8 +507,9 @@ main(int argc, char *argv[]) timespecsub(&ti, &td, &tc); debug("snooze YES\n"); snooze(&tc, cfg); - } else + } else { debug("snooze NO\n"); + } } return EXIT_SUCCESS;