aboutsummaryrefslogtreecommitdiffstats
path: root/src/sum.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2021-04-11 18:23:21 +0100
committerPádraig Brady <P@draigBrady.com>2021-04-11 18:33:45 +0100
commitef772bf97f7ec577754cbb5b278504d83cf41a43 (patch)
treeb6553bdc35b4d08368d427dbb3bb790acf43129c /src/sum.c
parentls: cache name width determination (diff)
downloadcoreutils-ef772bf97f7ec577754cbb5b278504d83cf41a43.tar.gz
coreutils-ef772bf97f7ec577754cbb5b278504d83cf41a43.zip
maint: use "char const *" rather than "const char *"
* cfg.mk (sc_prohibit-const-char): Add a new syntax-check to enforce this style. * *.[ch]: sed -i 's/const char \*/char const */g'
Diffstat (limited to 'src/sum.c')
-rw-r--r--src/sum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sum.c b/src/sum.c
index dd7bfb144..218db808d 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -85,7 +85,7 @@ Print checksum and block counts for each FILE.\n\
Return true if successful. */
static bool
-bsd_sum_file (const char *file, int print_name)
+bsd_sum_file (char const *file, int print_name)
{
FILE *fp;
int checksum = 0; /* The checksum mod 2^16. */
@@ -149,7 +149,7 @@ bsd_sum_file (const char *file, int print_name)
Return true if successful. */
static bool
-sysv_sum_file (const char *file, int print_name)
+sysv_sum_file (char const *file, int print_name)
{
int fd;
unsigned char buf[8192];
@@ -223,7 +223,7 @@ main (int argc, char **argv)
bool ok;
int optc;
int files_given;
- bool (*sum_func) (const char *, int) = bsd_sum_file;
+ bool (*sum_func) (char const *, int) = bsd_sum_file;
initialize_main (&argc, &argv);
set_program_name (argv[0]);