aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/leb.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2/leb.h')
-rw-r--r--gdb/dwarf2/leb.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/gdb/dwarf2/leb.h b/gdb/dwarf2/leb.h
index f312fc2..d76a1f9 100644
--- a/gdb/dwarf2/leb.h
+++ b/gdb/dwarf2/leb.h
@@ -57,14 +57,7 @@ read_2_signed_bytes (bfd *abfd, const gdb_byte *buf)
static inline unsigned int
read_3_bytes (bfd *abfd, const gdb_byte *buf)
{
- unsigned int result = 0;
- for (int i = 0; i < 3; ++i)
- {
- unsigned char byte = bfd_get_8 (abfd, buf);
- buf++;
- result |= ((unsigned int) byte << (i * 8));
- }
- return result;
+ return bfd_get_24 (abfd, buf);
}
static inline unsigned int