[RFC,3/3,gdb/contrib] Use shfmt --simplify in shfmt.sh

Message ID 20260902131739.2125928-4-tdevries@suse.de
State New
Headers
Series Add shfmt |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Skipped because it is an RFC
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Skipped because it is an RFC

Commit Message

Tom de Vries Sept. 2, 2026, 1:17 p.m. UTC
  Use shfmt --simplify in gdb/contrib/shfmt.sh.
---
 gdb/contrib/shfmt.sh | 1 +
 gdb/make-init-c      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gdb/contrib/shfmt.sh b/gdb/contrib/shfmt.sh
index 0f1cf332b2a..e6ab481e17f 100755
--- a/gdb/contrib/shfmt.sh
+++ b/gdb/contrib/shfmt.sh
@@ -50,6 +50,7 @@  with_indent()
 	--space-redirects \
 	--case-indent \
 	--binary-next-line \
+	--simplify \
 	--write \
 	"$@"
 }
diff --git a/gdb/make-init-c b/gdb/make-init-c
index 47bcfd44533..bb8cc6db1f1 100755
--- a/gdb/make-init-c
+++ b/gdb/make-init-c
@@ -64,7 +64,7 @@  echo ""
 echo "  /* If GDB_REVERSE_INIT_FUNCTIONS is set (any value), reverse the"
 echo "     order in which initialization functions are called.  This is"
 echo "     used by the testsuite.  */"
-echo "  if (getenv (\"GDB_REVERSE_INIT_FUNCTIONS\") != nullptr)"
+echo '  if (getenv ("GDB_REVERSE_INIT_FUNCTIONS") != nullptr)'
 echo "    std::reverse (functions.begin (), functions.end ());"
 echo ""
 echo "  for (initialize_file_ftype *function : functions)"