Skip to content

Commit

Permalink
Refactor single statement conditionals in twc.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Neved4 committed Dec 14, 2023
1 parent 9bf6108 commit 153e45d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions twc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 153e45d

Please sign in to comment.