aboutsummaryrefslogtreecommitdiff
path: root/gdb/minidebug.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 /gdb/minidebug.c
parentfeddea4b466ce4f2bb2301fd2d4bef56e8d09ccc (diff)
downloadbinutils-226f9f4fadb087875ef98a0a55d614236c6241b3.zip
binutils-226f9f4fadb087875ef98a0a55d614236c6241b3.tar.gz
binutils-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 'gdb/minidebug.c')
-rw-r--r--gdb/minidebug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/minidebug.c b/gdb/minidebug.c
index 53d34d3..a3ab0e3 100644
--- a/gdb/minidebug.c
+++ b/gdb/minidebug.c
@@ -95,7 +95,7 @@ lzma_open (struct bfd *nbfd, void *open_closure)
offset = section->filepos + size - LZMA_STREAM_HEADER_SIZE;
if (size < LZMA_STREAM_HEADER_SIZE
|| bfd_seek (section->owner, offset, SEEK_SET) != 0
- || bfd_bread (footer, LZMA_STREAM_HEADER_SIZE, section->owner)
+ || bfd_read (footer, LZMA_STREAM_HEADER_SIZE, section->owner)
!= LZMA_STREAM_HEADER_SIZE
|| lzma_stream_footer_decode (&options, footer) != LZMA_OK
|| offset < options.backward_size)
@@ -109,7 +109,7 @@ lzma_open (struct bfd *nbfd, void *open_closure)
index = NULL;
pos = 0;
if (bfd_seek (section->owner, offset, SEEK_SET) != 0
- || bfd_bread (indexdata, options.backward_size, section->owner)
+ || bfd_read (indexdata, options.backward_size, section->owner)
!= options.backward_size
|| lzma_index_buffer_decode (&index, &memlimit, &gdb_lzma_allocator,
indexdata, &pos, options.backward_size)
@@ -162,7 +162,7 @@ lzma_pread (struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes,
compressed = (gdb_byte *) xmalloc (iter.block.total_size);
block_offset = section->filepos + iter.block.compressed_file_offset;
if (bfd_seek (section->owner, block_offset, SEEK_SET) != 0
- || bfd_bread (compressed, iter.block.total_size, section->owner)
+ || bfd_read (compressed, iter.block.total_size, section->owner)
!= iter.block.total_size)
{
xfree (compressed);