]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
clean-up bfd/elf-attrs.c: change return type of uleb128_size to unsigned
authorMatthieu Longo <matthieu.longo@arm.com>
Mon, 20 Jan 2025 10:23:21 +0000 (10:23 +0000)
committerMatthieu Longo <matthieu.longo@arm.com>
Tue, 4 Mar 2025 11:02:02 +0000 (11:02 +0000)
bfd/elf-attrs.c

index f9fe0880264acd4645566e0cd8cf82ca7968eaf2..4785f2867926cd68260e4c5209f5279bef7bf400 100644 (file)
 #include "elf-bfd.h"
 
 /* Return the number of bytes needed by I in uleb128 format.  */
-static int
-uleb128_size (unsigned int i)
+static uint32_t
+uleb128_size (uint32_t i)
 {
-  int size;
-  size = 1;
+  uint32_t size = 1;
   while (i >= 0x80)
     {
       i >>= 7;
@@ -127,7 +126,7 @@ bfd_elf_obj_attr_size (bfd *abfd)
 /* Write VAL in uleb128 format to P, returning a pointer to the
    following byte.  */
 static bfd_byte *
-write_uleb128 (bfd_byte *p, unsigned int val)
+write_uleb128 (bfd_byte *p, uint32_t val)
 {
   bfd_byte c;
   do