diff options
author | Alan Modra <amodra@gmail.com> | 2023-08-07 14:40:35 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-08-09 08:48:09 +0930 |
commit | 226f9f4fadb087875ef98a0a55d614236c6241b3 (patch) | |
tree | e6c63b104143dd86acf739d5633649582668224e /bfd/cisco-core.c | |
parent | feddea4b466ce4f2bb2301fd2d4bef56e8d09ccc (diff) | |
download | gdb-226f9f4fadb087875ef98a0a55d614236c6241b3.zip gdb-226f9f4fadb087875ef98a0a55d614236c6241b3.tar.gz 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/cisco-core.c')
-rw-r--r-- | bfd/cisco-core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/cisco-core.c b/bfd/cisco-core.c index 8fc8a35..345f06b 100644 --- a/bfd/cisco-core.c +++ b/bfd/cisco-core.c @@ -95,10 +95,10 @@ cisco_core_file_validate (bfd *abfd, int crash_info_loc) size_t amt; flagword flags; - if (bfd_seek (abfd, (file_ptr) crash_info_loc, SEEK_SET) != 0) + if (bfd_seek (abfd, crash_info_loc, SEEK_SET) != 0) return NULL; - nread = bfd_bread (buf, (bfd_size_type) 4, abfd); + nread = bfd_read (buf, 4, abfd); if (nread != 4) { if (bfd_get_error () != bfd_error_system_call) @@ -107,14 +107,14 @@ cisco_core_file_validate (bfd *abfd, int crash_info_loc) } crashinfo_offset = MASK_ADDR (bfd_get_32 (abfd, buf)); - if (bfd_seek (abfd, (file_ptr) crashinfo_offset, SEEK_SET) != 0) + if (bfd_seek (abfd, crashinfo_offset, SEEK_SET) != 0) { /* Most likely we failed because of a bogus (huge) offset */ bfd_set_error (bfd_error_wrong_format); return NULL; } - nread = bfd_bread (&crashinfo, (bfd_size_type) sizeof (crashinfo), abfd); + nread = bfd_read (&crashinfo, sizeof (crashinfo), abfd); if (nread != sizeof (crashinfo)) { if (bfd_get_error () != bfd_error_system_call) |