From a8d6995d1d0e6968db0c0cf5d18f1f4afb4213ae Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@fb.com>
Date: Mon, 20 Dec 2021 12:44:44 -0800
Subject: [PATCH 1/2] maint: split a long line

* src/test.c (three_arguments): Split long line.
---
 src/test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test.c b/src/test.c
index 00393ddd3..47d79f465 100644
--- a/src/test.c
+++ b/src/test.c
@@ -628,7 +628,8 @@ three_arguments (void)
   else if (STREQ (argv[pos + 1], "-a") || STREQ (argv[pos + 1], "-o"))
     value = expr ();
   else
-    test_syntax_error (_("%s: binary operator expected"), quote (argv[pos + 1]));
+    test_syntax_error (_("%s: binary operator expected"),
+                       quote (argv[pos + 1]));
   return (value);
 }

-- 
2.34.1.182.ge773545c7f


From 9efdd17b5e4ac74b4930d8a979feb8acf12c2c00 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@fb.com>
Date: Mon, 20 Dec 2021 12:48:33 -0800
Subject: [PATCH 2/2] maint: syntax-check requires "char const *", not "const
 char *"

* gl/lib/mbsalign.c (mbs_align_pad): Adjust.
* src/chroot.c (is_root): Adjust.
* src/digest.c (main): Adjust.
* src/relpath.c (buffer_or_output) Adjust.
* src/ls.c (print_name_with_quoting, get_color_indicator): Adjust.
---
 gl/lib/mbsalign.c |  2 +-
 src/chroot.c      |  2 +-
 src/digest.c      | 12 ++++++------
 src/ls.c          |  4 ++--
 src/relpath.c     |  2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gl/lib/mbsalign.c b/gl/lib/mbsalign.c
index 61a4c2a98..e99eac04d 100644
--- a/gl/lib/mbsalign.c
+++ b/gl/lib/mbsalign.c
@@ -83,7 +83,7 @@ wc_truncate (wchar_t *wc, size_t width)
    A pointer to the terminating NUL is returned.  */

 static char *
-mbs_align_pad (char *dest, const char *dest_end, size_t n_spaces)
+mbs_align_pad (char *dest, char const *dest_end, size_t n_spaces)
 {
   /* FIXME: Should we pad with "figure space" (\u2007)
      if non ascii data present?  */
diff --git a/src/chroot.c b/src/chroot.c
index fcfe45eda..b6dda8616 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -169,7 +169,7 @@ parse_additional_groups (char const *groups, GETGROUPS_T **pgids,
    could be bind mounted to a separate location.  */

 static bool
-is_root (const char *dir)
+is_root (char const *dir)
 {
   char *resolved = canonicalize_file_name (dir);
   bool is_res_root = resolved && STREQ ("/", resolved);
diff --git a/src/digest.c b/src/digest.c
index 22e862285..c9e7caf47 100644
--- a/src/digest.c
+++ b/src/digest.c
@@ -1270,15 +1270,15 @@ main (int argc, char **argv)
   setvbuf (stdout, NULL, _IOLBF, 0);

 #if HASH_ALGO_SUM
-  const char *short_opts = "rs";
+  char const *short_opts = "rs";
 #elif HASH_ALGO_CKSUM
-  const char *short_opts = "a:l:bctwz";
-  const char *digest_length_str = "";
+  char const *short_opts = "a:l:bctwz";
+  char const *digest_length_str = "";
 #elif HASH_ALGO_BLAKE2
-  const char *short_opts = "l:bctwz";
-  const char *digest_length_str = "";
+  char const *short_opts = "l:bctwz";
+  char const *digest_length_str = "";
 #else
-  const char *short_opts = "bctwz";
+  char const *short_opts = "bctwz";
 #endif

   while ((opt = getopt_long (argc, argv, short_opts, long_options, NULL)) != -1)
diff --git a/src/ls.c b/src/ls.c
index 36ab42aad..6e87af651 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -4809,7 +4809,7 @@ print_name_with_quoting (const struct fileinfo *f,
                          struct obstack *stack,
                          size_t start_col)
 {
-  const char *name = symlink_target ? f->linkname : f->name;
+  char const *name = symlink_target ? f->linkname : f->name;

   const struct bin_str *color = print_with_color ?
                                 get_color_indicator (f, symlink_target) : NULL;
@@ -4953,7 +4953,7 @@ get_color_indicator (const struct fileinfo *f, bool symlink_target)
   struct color_ext_type *ext;	/* Color extension */
   size_t len;			/* Length of name */

-  const char *name;
+  char const *name;
   mode_t mode;
   int linkok;
   if (symlink_target)
diff --git a/src/relpath.c b/src/relpath.c
index 2798f6385..83e620a9d 100644
--- a/src/relpath.c
+++ b/src/relpath.c
@@ -64,7 +64,7 @@ path_common_prefix (char const *path1, char const *path2)
    and adjust *PLEN to reflect the remaining space.
    Return TRUE on failure.  */
 static bool
-buffer_or_output (const char *str, char **pbuf, size_t *plen)
+buffer_or_output (char const *str, char **pbuf, size_t *plen)
 {
   if (*pbuf)
     {
-- 
2.34.1.182.ge773545c7f

