summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-09-14 04:08:52 +0000
committerJim Meyering <jim@meyering.net>1997-09-14 04:08:52 +0000
commit22c2c69da4dd1dda485cc61d262ebcb5090a006e (patch)
tree6fd0d2d0e0b1632ecd55b1bdab9aa51f42f2e86f /src/ls.c
parentd9f0902259538b519682110f73b38b2cf2626ee0 (diff)
downloadcoreutils-22c2c69da4dd1dda485cc61d262ebcb5090a006e.tar.xz
(print_horizontal): Add some non-essential curly braces.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/ls.c b/src/ls.c
index d9d8a84f6..9393e1816 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2720,24 +2720,30 @@ print_horizontal (void)
name_length = length_of_file_name_and_frills (files + filesno);
for (i = 0; i < max_cols; ++i)
- if (col_info[i].valid)
- {
- int idx = filesno % (i + 1);
- int real_length = name_length + (idx == i ? 0 : 2);
-
- if (real_length > col_info[i].col_arr[idx])
- {
- col_info[i].line_len += real_length - col_info[i].col_arr[idx];
- col_info[i].col_arr[idx] = real_length;
- col_info[i].valid = col_info[i].line_len < line_length;
- }
- }
+ {
+ if (col_info[i].valid)
+ {
+ int idx = filesno % (i + 1);
+ int real_length = name_length + (idx == i ? 0 : 2);
+
+ if (real_length > col_info[i].col_arr[idx])
+ {
+ col_info[i].line_len += (real_length
+ - col_info[i].col_arr[idx]);
+ col_info[i].col_arr[idx] = real_length;
+ col_info[i].valid = col_info[i].line_len < line_length;
+ }
+ }
+ }
}
/* Find maximum allowed columns. */
for (cols = max_cols; cols > 1; --cols)
- if (col_info[cols - 1].valid)
- break;
+ {
+ if (col_info[cols - 1].valid)
+ break;
+ }
+
line_fmt = &col_info[cols - 1];
pos = 0;