diff options
author | Martin Liska <mliska@suse.cz> | 2021-03-22 14:56:16 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-04-01 15:00:56 +0200 |
commit | e9b095a538c189369b4792662ea455d2314b0492 (patch) | |
tree | 8a6918add18cd366abcee7964b40605471ce18df /opcodes | |
parent | d34049e8bb32ae2dd717dbac88dbcebefe2d6c09 (diff) | |
download | binutils-e9b095a538c189369b4792662ea455d2314b0492.zip binutils-e9b095a538c189369b4792662ea455d2314b0492.tar.gz binutils-e9b095a538c189369b4792662ea455d2314b0492.tar.bz2 |
Remove strneq macro and use startswith.
bfd/ChangeLog:
* ecoff.c (strneq): Remove strneq and use startswith.
(_bfd_ecoff_slurp_armap): Likewise.
binutils/ChangeLog:
* elfcomm.h (strneq): Remove strneq and use startswith.
* readelf.c (ia64_process_unwind): Likewise.
(process_note): Likewise.
gas/ChangeLog:
* config/obj-coff.c (strneq): Remove strneq and use startswith.
(weak_is_altname): Likewise.
(obj_coff_section): Likewise.
* config/tc-cr16.c (process_label_constant): Likewise.
* config/tc-crx.c (strneq): Likewise.
include/ChangeLog:
* opcode/cr16.h (strneq): Remove strneq and use startswith.
ld/ChangeLog:
* ldbuildid.c (strneq): Remove strneq and use startswith.
(validate_build_id_style): Likewise.
(compute_build_id_size): Likewise.
opcodes/ChangeLog:
* arm-dis.c (strneq): Remove strneq and use startswith.
* cr16-dis.c (print_insn_cr16): Likewise.
* score-dis.c (streq): Likewise.
(strneq): Likewise.
* score7-dis.c (strneq): Likewise.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 8 | ||||
-rw-r--r-- | opcodes/arm-dis.c | 5 | ||||
-rw-r--r-- | opcodes/cr16-dis.c | 2 | ||||
-rw-r--r-- | opcodes/score-dis.c | 8 | ||||
-rw-r--r-- | opcodes/score7-dis.c | 4 |
5 files changed, 9 insertions, 18 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index d89e876..a08e57a 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,11 @@ +2021-04-01 Martin Liska <mliska@suse.cz> + + * arm-dis.c (strneq): Remove strneq and use startswith. + * cr16-dis.c (print_insn_cr16): Likewise. + * score-dis.c (streq): Likewise. + (strneq): Likewise. + * score7-dis.c (strneq): Likewise. + 2021-04-01 Alan Modra <amodra@gmail.com> PR 27675 diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index 7979987..4130919 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -39,11 +39,6 @@ #include "elf/arm.h" #include "mach-o.h" -/* FIXME: Belongs in global header. */ -#ifndef strneq -#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0) -#endif - /* Cached mapping symbol state. */ enum map_type { diff --git a/opcodes/cr16-dis.c b/opcodes/cr16-dis.c index d5840cb..ac85552 100644 --- a/opcodes/cr16-dis.c +++ b/opcodes/cr16-dis.c @@ -800,7 +800,7 @@ print_insn_cr16 (bfd_vma memaddr, struct disassemble_info *info) /* If found, print the instruction's mnemonic and arguments. */ if (is_decoded > 0 && (cr16_words[0] != 0 || cr16_words[1] != 0)) { - if (strneq (instruction->mnemonic, "cinv", 4)) + if (startswith (instruction->mnemonic, "cinv")) info->fprintf_func (info->stream,"%s", getcinvstring (instruction->mnemonic)); else diff --git a/opcodes/score-dis.c b/opcodes/score-dis.c index c1b9227..3ec5c6a 100644 --- a/opcodes/score-dis.c +++ b/opcodes/score-dis.c @@ -477,14 +477,6 @@ static struct score_opcode score_opcodes[] = }; -#ifndef streq -#define streq(a,b) (strcmp ((a), (b)) == 0) -#endif - -#ifndef strneq -#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0) -#endif - #ifndef NUM_ELEM #define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0]) #endif diff --git a/opcodes/score7-dis.c b/opcodes/score7-dis.c index 5387307..6ffc7f6 100644 --- a/opcodes/score7-dis.c +++ b/opcodes/score7-dis.c @@ -37,10 +37,6 @@ #define streq(a,b) (strcmp ((a), (b)) == 0) #endif -#ifndef strneq -#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0) -#endif - #ifndef NUM_ELEM #define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0]) #endif |