aboutsummaryrefslogtreecommitdiff
path: root/sim/rx
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-10-26 22:42:10 +0545
committerMike Frysinger <vapier@gentoo.org>2022-10-31 21:24:39 +0545
commited60d3edd51f6c33fb0f3f09400094a1b1c2ceb2 (patch)
tree9fec7827dac0d17642f854d02c497a3b45692dfb /sim/rx
parentead2618501e8ba696bf29de635a9a5f6a1ba1b0e (diff)
downloadgdb-ed60d3edd51f6c33fb0f3f09400094a1b1c2ceb2.zip
gdb-ed60d3edd51f6c33fb0f3f09400094a1b1c2ceb2.tar.gz
gdb-ed60d3edd51f6c33fb0f3f09400094a1b1c2ceb2.tar.bz2
sim: constify various integer readers
These functions only read from memory, so mark the pointer as const.
Diffstat (limited to 'sim/rx')
-rw-r--r--sim/rx/gdb-if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c
index c116bdc..7af37b9 100644
--- a/sim/rx/gdb-if.c
+++ b/sim/rx/gdb-if.c
@@ -276,7 +276,7 @@ sim_write (SIM_DESC sd, SIM_ADDR mem, const void *buffer, int length)
/* Read the LENGTH bytes at BUF as an little-endian value. */
static DI
-get_le (unsigned char *buf, int length)
+get_le (const unsigned char *buf, int length)
{
DI acc = 0;
while (--length >= 0)
@@ -287,7 +287,7 @@ get_le (unsigned char *buf, int length)
/* Read the LENGTH bytes at BUF as a big-endian value. */
static DI
-get_be (unsigned char *buf, int length)
+get_be (const unsigned char *buf, int length)
{
DI acc = 0;
while (length-- > 0)