aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}
}