From 153e45de61040e434321661742457f1e40c6d9a3 Mon Sep 17 00:00:00 2001 From: Neveda <63655535+Neved4@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:24:00 +0100 Subject: [PATCH] Refactor single statement conditionals in `twc.c` --- twc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/twc.c b/twc.c index e901a69..13fd4f5 100644 --- a/twc.c +++ b/twc.c @@ -77,9 +77,8 @@ static void fparse(const char *s, const char *fpath, const char *fmt) { continue; size_t width = strlen(line); - if (width > max_width) { + if (width > max_width) max_width = width; - } } max_width++; @@ -115,9 +114,8 @@ int main(int argc, char **argv) { timefmt = time_fmts[TIMEFMT_ISO]; const char *tz_env = getenv("TZ"); - if (tz_env) { + if (tz_env) fmt = tz_env; - } while ((opt = getopt(argc, argv, "hf:s:t:")) != -1) { switch (opt) {