aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-02-20 21:16:06 +0100
committerMattias Andrée <maandree@kth.se>2018-02-20 21:16:06 +0100
commit96035c2958bc2a29fabdca1372689a36d4e869de (patch)
treede91a9826a4325d84f287032abf7613d738ef508
parentTreat all files as regular files (diff)
downloadloc-96035c2958bc2a29fabdca1372689a36d4e869de.tar.gz
loc-96035c2958bc2a29fabdca1372689a36d4e869de.tar.bz2
loc-96035c2958bc2a29fabdca1372689a36d4e869de.tar.xz
Improve readability
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--loc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/loc.c b/loc.c
index 70c21ba..8c49152 100644
--- a/loc.c
+++ b/loc.c
@@ -174,11 +174,9 @@ main(int argc, char *argv[])
}
if (res[i].n >= 0) {
left = strwidth(argv[i]);
- if (left > maxleft)
- maxleft = left;
+ left = left > maxleft ? left : maxleft;
right = zuwidth(res[i].n);
- if (right > maxright)
- maxright = right;
+ right = right > maxright ? right : maxright;
res[i].width = left + right;
}
}