From 226f9f4fadb087875ef98a0a55d614236c6241b3 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 7 Aug 2023 14:40:35 +0930 Subject: 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). --- sim/cris/sim-if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sim/cris') diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index 5c220ff..cad7169 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -262,7 +262,7 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write) (uint64_t) lma, (uint64_t) phdr[i].p_filesz); if (bfd_seek (abfd, phdr[i].p_offset, SEEK_SET) != 0 - || (bfd_bread (buf, phdr[i].p_filesz, abfd) != phdr[i].p_filesz)) + || (bfd_read (buf, phdr[i].p_filesz, abfd) != phdr[i].p_filesz)) { sim_io_eprintf (sd, "%s: could not read segment at 0x%" PRIx64 ", " @@ -530,7 +530,7 @@ cris_handle_interpreter (SIM_DESC sd, struct bfd *abfd) /* Read in the name. */ if (bfd_seek (abfd, phdr[i].p_offset, SEEK_SET) != 0 - || (bfd_bread (interp + strlen (simulator_sysroot), interplen, abfd) + || (bfd_read (interp + strlen (simulator_sysroot), interplen, abfd) != interplen)) goto interpname_failed; -- cgit v1.1