mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(inittables): Use sizeof *var' rather than sizeof EXPLICIT_TYPE'.
The former is more maintainable and usually shorter. (sort): Split a long line.
This commit is contained in:
1 parent
9ecbfc3886
commit
08fd60e693
1 file changed
+3
-2
+3
-2
@@ -573,7 +573,7 @@ inittables (void)
|
||||
name[j] = '\0';
|
||||
}
|
||||
qsort ((void *) monthtab, MONTHS_PER_YEAR,
|
||||
sizeof (struct month), struct_month_cmp);
|
||||
sizeof *monthtab, struct_month_cmp);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1992,7 +1992,8 @@ sort (char * const *files, int nfiles, char const *output_file)
|
||||
char const *file = *files;
|
||||
FILE *fp = xfopen (file, "r");
|
||||
FILE *tfp;
|
||||
size_t bytes_per_line = 2 * sizeof (struct line) - sizeof (struct line) / 2;
|
||||
size_t bytes_per_line = (2 * sizeof (struct line)
|
||||
- sizeof (struct line) / 2);
|
||||
|
||||
if (! buf.alloc)
|
||||
initbuf (&buf, bytes_per_line,
|
||||
|
||||
Reference in new issue
Block a user