aboutsummaryrefslogtreecommitdiffstats
path: root/src/wc.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/wc.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/wc.c')
-rw-r--r--src/wc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wc.c b/src/wc.c
index 5216db189..a122bde80 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -173,7 +173,7 @@ write_counts (uintmax_t lines,
uintmax_t chars,
uintmax_t bytes,
uintmax_t linelength,
- const char *file)
+ char const *file)
{
static char const format_sp_int[] = " %*s";
char const *format_int = format_sp_int + 1;
@@ -379,7 +379,7 @@ wc (int fd, char const *file_x, struct fstatus *fstatus, off_t current_pos)
while ((bytes_read = safe_read (fd, buf + prev, BUFFER_SIZE - prev)) > 0)
{
- const char *p;
+ char const *p;
# if SUPPORT_OLD_MBRTOWC
mbstate_t backup_state;
# endif
@@ -519,7 +519,7 @@ wc (int fd, char const *file_x, struct fstatus *fstatus, off_t current_pos)
while ((bytes_read = safe_read (fd, buf, BUFFER_SIZE)) > 0)
{
- const char *p = buf;
+ char const *p = buf;
if (bytes_read == SAFE_READ_ERROR)
{
error (0, errno, "%s", quotef (file));