[1/6] Make remote_fio_func_map 'const'

Message ID 20231231-remote-fileio-v1-1-249cc6c440d9@tromey.com
State New
Headers
Series Make remote-fileio per-target |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed

Commit Message

Tom Tromey Dec. 31, 2023, 8:25 p.m. UTC
  This changes remote_fio_func_map to be const, letting it move into the
readonly data section.
---
 gdb/remote-fileio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index 10bc86c1ba5..367edb54f74 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -1101,7 +1101,7 @@  remote_fileio_func_system (remote_target *remote, char *buf)
     remote_fileio_return_success (remote, WEXITSTATUS (ret));
 }
 
-static struct {
+static const struct {
   const char *name;
   void (*func)(remote_target *remote, char *);
 } remote_fio_func_map[] = {