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 /gdb/coffread.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 'gdb/coffread.c')
-rw-r--r-- | gdb/coffread.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c index 6ec341c..583db6b 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1224,14 +1224,14 @@ read_one_sym (struct coff_symbol *cs, bfd_size_type bytes; cs->c_symnum = symnum; - bytes = bfd_bread (temp_sym, local_symesz, nlist_bfd_global); + bytes = bfd_read (temp_sym, local_symesz, nlist_bfd_global); if (bytes != local_symesz) error (_("%s: error reading symbols"), objfile_name (coffread_objfile)); bfd_coff_swap_sym_in (symfile_bfd, temp_sym, (char *) sym); cs->c_naux = sym->n_numaux & 0xff; if (cs->c_naux >= 1) { - bytes = bfd_bread (temp_aux, local_auxesz, nlist_bfd_global); + bytes = bfd_read (temp_aux, local_auxesz, nlist_bfd_global); if (bytes != local_auxesz) error (_("%s: error reading symbols"), objfile_name (coffread_objfile)); bfd_coff_swap_aux_in (symfile_bfd, temp_aux, @@ -1241,7 +1241,7 @@ read_one_sym (struct coff_symbol *cs, is important). */ for (i = 1; i < cs->c_naux; i++) { - bytes = bfd_bread (temp_aux, local_auxesz, nlist_bfd_global); + bytes = bfd_read (temp_aux, local_auxesz, nlist_bfd_global); if (bytes != local_auxesz) error (_("%s: error reading symbols"), objfile_name (coffread_objfile)); @@ -1308,7 +1308,7 @@ init_stringtab (bfd *abfd, file_ptr offset, gdb::unique_xmalloc_ptr<char> *stora if (bfd_seek (abfd, offset, 0) < 0) return -1; - val = bfd_bread ((char *) lengthbuf, sizeof lengthbuf, abfd); + val = bfd_read ((char *) lengthbuf, sizeof lengthbuf, abfd); length = bfd_h_get_32 (symfile_bfd, lengthbuf); /* If no string table is needed, then the file may end immediately @@ -1324,8 +1324,8 @@ init_stringtab (bfd *abfd, file_ptr offset, gdb::unique_xmalloc_ptr<char> *stora if (length == sizeof length) /* Empty table -- just the count. */ return 0; - val = bfd_bread (stringtab + sizeof lengthbuf, - length - sizeof lengthbuf, abfd); + val = bfd_read (stringtab + sizeof lengthbuf, + length - sizeof lengthbuf, abfd); if (val != length - sizeof lengthbuf || stringtab[length - 1] != '\0') return -1; @@ -1409,7 +1409,7 @@ init_lineno (bfd *abfd, file_ptr offset, file_ptr size, storage->reset ((char *) xmalloc (size + local_linesz)); linetab = storage->get (); - val = bfd_bread (storage->get (), size, abfd); + val = bfd_read (storage->get (), size, abfd); if (val != size) return -1; |