From d72a03cedb76f9a30940a583b71b0e5318d33e44 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 28 Jan 2026 11:20:57 -0800 Subject: [PATCH] =?utf8?q?maint:=20space=20between=20=E2=80=98char?= =?utf8?q?=E2=80=99=20and=20=E2=80=98*=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/basenc.c | 2 +- src/copy.c | 4 ++-- src/expand-common.c | 2 +- src/ls.c | 2 +- src/numfmt.c | 4 ++-- src/system.h | 8 ++++---- tests/df/no-mtab-status.sh | 4 ++-- tests/nproc/nproc-quota.sh | 2 +- tests/rm/rm-readdir-fail.sh | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/basenc.c b/src/basenc.c index 4e0eb92fb4..cd86b106a6 100644 --- a/src/basenc.c +++ b/src/basenc.c @@ -1272,7 +1272,7 @@ base58_encode_ctx (struct base_encode_context *ctx, } static void -base58_encode (char const* data, size_t data_len, +base58_encode (char const *data, size_t data_len, char *out, idx_t *outlen) { affirm (base_length (data_len) <= *outlen); diff --git a/src/copy.c b/src/copy.c index 198f762e9f..c76f936fd5 100644 --- a/src/copy.c +++ b/src/copy.c @@ -131,7 +131,7 @@ static char const *top_level_dst_name; /* debug info about the last file copy. */ static struct copy_debug copy_debug; -static const char* +static const char * copy_debug_string (enum copy_debug_val debug_val) { switch (debug_val) @@ -148,7 +148,7 @@ copy_debug_string (enum copy_debug_val debug_val) } } -static const char* +static const char * copy_debug_sparse_string (enum copy_debug_val debug_val) { switch (debug_val) diff --git a/src/expand-common.c b/src/expand-common.c index 92e7695ab3..f63e6d80b8 100644 --- a/src/expand-common.c +++ b/src/expand-common.c @@ -399,7 +399,7 @@ cleanup_file_list_stdin (void) /* Emit the --help output for --tabs=LIST option accepted by expand and unexpand. */ extern void -emit_tab_list_info (char const* program) +emit_tab_list_info (char const *program) { /* suppress syntax check for emit_mandatory_arg_note() */ oputs_ (program, _("\ diff --git a/src/ls.c b/src/ls.c index 75215141fe..70ddba10d0 100644 --- a/src/ls.c +++ b/src/ls.c @@ -4902,7 +4902,7 @@ print_color_indicator (const struct bin_str *ind) /* Returns color indicator or NULL if none. */ ATTRIBUTE_PURE -static const struct bin_str* +static const struct bin_str * get_color_indicator (const struct fileinfo *f, bool symlink_target) { enum indicator_no type; diff --git a/src/numfmt.c b/src/numfmt.c index 5484056361..fb6cb33969 100644 --- a/src/numfmt.c +++ b/src/numfmt.c @@ -1406,7 +1406,7 @@ is_utf8_charset (void) Return a pointer to the character, or NULL if not found. */ ATTRIBUTE_PURE static char * -mbsmbchr (char const* s, char const* c) +mbsmbchr (char const *s, char const *c) { unsigned char uc = *c; /* GB18030 is the most restrictive for the 0x30 optimization below. */ @@ -1420,7 +1420,7 @@ mbsmbchr (char const* s, char const* c) /* Return a pointer to the beginning of the next field in line. The line pointer is moved to the end of the next field. */ -static char* +static char * next_field (char **line) { char *field_start = *line; diff --git a/src/system.h b/src/system.h index 7e1fdbff03..6a84d1cc32 100644 --- a/src/system.h +++ b/src/system.h @@ -546,7 +546,7 @@ is_nul (void const *buf, size_t length) #define oputs(option) oputs_ (PROGRAM_NAME, option) static inline void -oputs_ (MAYBE_UNUSED char const* program, char const *option) +oputs_ (MAYBE_UNUSED char const *program, char const *option) { static int help_no_sgr = #if ! defined MANUAL_URL && ! defined BOLD_MAN_REFS @@ -567,7 +567,7 @@ oputs_ (MAYBE_UNUSED char const* program, char const *option) return; } - char const* first_word = option + strspn (option, " \t\n"); + char const *first_word = option + strspn (option, " \t\n"); char const *option_text = strchr (option, '-'); if (!option_text) option_text = first_word; /* for dd option syntax. */ @@ -656,7 +656,7 @@ oputs_ (MAYBE_UNUSED char const* program, char const *option) #define oprintf(...) oprintf_ (PROGRAM_NAME, __VA_ARGS__) ATTRIBUTE_FORMAT ((printf, 2, 3)) static inline void -oprintf_ (char const* program, char const *message, ...) +oprintf_ (char const *program, char const *message, ...) { va_list args; char *buf; @@ -751,7 +751,7 @@ the VERSION_CONTROL environment variable. Here are the values:\n\ #define emit_symlink_recurse_options(default_opt) \ emit_symlink_recurse_options_ (PROGRAM_NAME, default_opt) static inline void -emit_symlink_recurse_options_ (char const* program, char const *default_opt) +emit_symlink_recurse_options_ (char const *program, char const *default_opt) { printf (_("\ \n\ diff --git a/tests/df/no-mtab-status.sh b/tests/df/no-mtab-status.sh index af8dd721fc..6573476ffb 100755 --- a/tests/df/no-mtab-status.sh +++ b/tests/df/no-mtab-status.sh @@ -40,9 +40,9 @@ sed 's/streq/0==str''cmp/' > k.c < #include -static FILE* (*fopen_func)(const char *, const char *); +static FILE *(*fopen_func) (const char *, const char *); -FILE* fopen(const char *path, const char *mode) +FILE *fopen(const char *path, const char *mode) { /* get reference to original (libc provided) fopen */ diff --git a/tests/nproc/nproc-quota.sh b/tests/nproc/nproc-quota.sh index 01ffd38fff..0d49231338 100755 --- a/tests/nproc/nproc-quota.sh +++ b/tests/nproc/nproc-quota.sh @@ -32,7 +32,7 @@ int sched_getscheduler (pid_t pid) { fclose (fopen ("preloaded","w")); /* marker for preloaded interception */ - FILE* policyf = fopen ("/proc/self/sched", "r"); + FILE *policyf = fopen ("/proc/self/sched", "r"); int policy; #define fscanfmt fscanf /* Avoid syntax check. */ if (pid == 0 && fscanfmt (policyf, "policy : %d", &policy) == 1) diff --git a/tests/rm/rm-readdir-fail.sh b/tests/rm/rm-readdir-fail.sh index 091bbbc5a1..130685cbac 100755 --- a/tests/rm/rm-readdir-fail.sh +++ b/tests/rm/rm-readdir-fail.sh @@ -56,7 +56,7 @@ struct dirent *readdir (DIR *dirp) errno = ESRCH; return NULL; } - struct dirent* d; + struct dirent *d; if (! (d = real_readdir (dirp))) { fprintf (stderr, "Failed to get dirent\n"); -- 2.47.3