From 2354bf5c588efcc10ae73e52b2150785ed8ce64e Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Sat, 16 Sep 2006 18:12:17 +0000 Subject: * bfd-in.h (STRING_AND_COMMA): New macro. Takes one constant string as its argument and emits the string followed by a comma and then the length of the string. (CONST_STRNEQ): New macro. Checks to see if a variable string has a constant string as its initial characters. (CONST_STRNCPY): New macro. Copies a constant string to the start of a variable string. * bfd-in2.h: Regenerate. * : Make use of the new macros. --- bfd/elf32-bfin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bfd/elf32-bfin.c') diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index 54900d05c7..6ceaeb0e08 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -5292,7 +5292,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, strip = FALSE; - if (strncmp (name, ".rela", 5) == 0) + if (CONST_STRNEQ (name, ".rela")) { if (s->size == 0) { @@ -5316,7 +5316,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, s->reloc_count = 0; } } - else if (strncmp (name, ".got", 4) != 0) + else if (! CONST_STRNEQ (name, ".got")) { /* It's not one of our sections, so don't allocate space. */ continue; -- cgit v1.2.1