diff options
author | Tom Tromey <tromey@adacore.com> | 2022-12-21 14:15:16 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-01-20 10:48:26 -0700 |
commit | 42938c1a5b84207e9b6526e56d8e57e1ad3bab5f (patch) | |
tree | 9283f9c7caaa77db215bc665c4f65c98a3e7ba4c /gdb/remote-notif.c | |
parent | 5a5319833d7bcac780f4a21cf1e72a4c5c67f575 (diff) | |
download | gdb-42938c1a5b84207e9b6526e56d8e57e1ad3bab5f.zip gdb-42938c1a5b84207e9b6526e56d8e57e1ad3bab5f.tar.gz gdb-42938c1a5b84207e9b6526e56d8e57e1ad3bab5f.tar.bz2 |
Constify notif_client
It seems to me that a notif_client is read-only, so this patch changes
the code to use "const" everywhere.
Diffstat (limited to 'gdb/remote-notif.c')
-rw-r--r-- | gdb/remote-notif.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/remote-notif.c b/gdb/remote-notif.c index b39f6df..dfa1d33 100644 --- a/gdb/remote-notif.c +++ b/gdb/remote-notif.c @@ -46,7 +46,7 @@ bool notif_debug = false; /* Supported clients of notifications. */ -static struct notif_client *notifs[] = +static const notif_client *const notifs[] = { ¬if_client_stop, }; @@ -58,7 +58,7 @@ gdb_static_assert (ARRAY_SIZE (notifs) == REMOTE_NOTIF_LAST); void remote_notif_ack (remote_target *remote, - struct notif_client *nc, const char *buf) + const notif_client *nc, const char *buf) { notif_event_up event = nc->alloc_event (); @@ -74,7 +74,7 @@ remote_notif_ack (remote_target *remote, struct notif_event * remote_notif_parse (remote_target *remote, - struct notif_client *nc, const char *buf) + const notif_client *nc, const char *buf) { notif_event_up event = nc->alloc_event (); @@ -91,11 +91,11 @@ remote_notif_parse (remote_target *remote, void remote_notif_process (struct remote_notif_state *state, - struct notif_client *except) + const notif_client *except) { while (!state->notif_queue.empty ()) { - struct notif_client *nc = state->notif_queue.front (); + const notif_client *nc = state->notif_queue.front (); state->notif_queue.pop_front (); gdb_assert (nc != except); @@ -120,7 +120,7 @@ remote_async_get_pending_events_handler (gdb_client_data data) void handle_notification (struct remote_notif_state *state, const char *buf) { - struct notif_client *nc; + const notif_client *nc; size_t i; for (i = 0; i < ARRAY_SIZE (notifs); i++) |