aboutsummaryrefslogtreecommitdiff
path: root/gdb/aarch64-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2024-04-16 13:12:28 -0600
committerTom Tromey <tom@tromey.com>2024-04-21 12:33:56 -0600
commit6e4be957f79b67c117220b39a663c0319dec6b2d (patch)
tree13b60fe4be599e69f1dc2320fe3217af9d66a139 /gdb/aarch64-tdep.c
parente6375bc8ebbbc177c79f08e9616eb0b131229f65 (diff)
downloadbinutils-6e4be957f79b67c117220b39a663c0319dec6b2d.zip
binutils-6e4be957f79b67c117220b39a663c0319dec6b2d.tar.gz
binutils-6e4be957f79b67c117220b39a663c0319dec6b2d.tar.bz2
Remove a couple of VLAs
I found a couple of spots where VLAs are in use but where they can easily be removed. In one spot, adding 'const' is enough -- and is already done in similar code elsewhere in the file. In another spot, one of two arrays will be used, so making the buffer large enough for both works. Approved-By: John Baldwin <jhb@FreeBSD.org>
Diffstat (limited to 'gdb/aarch64-tdep.c')
-rw-r--r--gdb/aarch64-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 545ec87..06eda10 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -5713,7 +5713,7 @@ aarch64_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR insn_addr)
{
uint32_t rec_no = 0;
- uint8_t insn_size = 4;
+ const uint8_t insn_size = 4;
uint32_t ret = 0;
gdb_byte buf[insn_size];
aarch64_insn_decode_record aarch64_record;