aboutsummaryrefslogtreecommitdiff
path: root/bfd/libbfd.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-08-07 14:40:35 +0930
committerAlan Modra <amodra@gmail.com>2023-08-09 08:48:09 +0930
commit226f9f4fadb087875ef98a0a55d614236c6241b3 (patch)
treee6c63b104143dd86acf739d5633649582668224e /bfd/libbfd.c
parentfeddea4b466ce4f2bb2301fd2d4bef56e8d09ccc (diff)
downloadfsf-binutils-gdb-226f9f4fadb087875ef98a0a55d614236c6241b3.zip
fsf-binutils-gdb-226f9f4fadb087875ef98a0a55d614236c6241b3.tar.gz
fsf-binutils-gdb-226f9f4fadb087875ef98a0a55d614236c6241b3.tar.bz2
Rename bfd_bread and bfd_bwrite
These were renamed from bfd_read and bfd_write back in 2001 when they lost an unnecessary parameter. Rename them back, and get rid of a few casts that are only needed without prototyped functions (K&R C).
Diffstat (limited to 'bfd/libbfd.c')
-rw-r--r--bfd/libbfd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index 7c75047..fafdf49 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -515,8 +515,8 @@ bool
bfd_write_bigendian_4byte_int (bfd *abfd, unsigned int i)
{
bfd_byte buffer[4];
- bfd_putb32 ((bfd_vma) i, buffer);
- return bfd_bwrite (buffer, (bfd_size_type) 4, abfd) == 4;
+ bfd_putb32 (i, buffer);
+ return bfd_write (buffer, 4, abfd) == 4;
}
@@ -1067,7 +1067,7 @@ _bfd_generic_get_section_contents (bfd *abfd,
}
if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
- || bfd_bread (location, count, abfd) != count)
+ || bfd_read (location, count, abfd) != count)
return false;
return true;
@@ -1145,7 +1145,7 @@ _bfd_generic_set_section_contents (bfd *abfd,
return true;
if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
- || bfd_bwrite (location, count, abfd) != count)
+ || bfd_write (location, count, abfd) != count)
return false;
return true;