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-sh-symbian.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bfd/elf32-sh-symbian.c') diff --git a/bfd/elf32-sh-symbian.c b/bfd/elf32-sh-symbian.c index 9ca0564c36..7ea9207009 100644 --- a/bfd/elf32-sh-symbian.c +++ b/bfd/elf32-sh-symbian.c @@ -1,5 +1,5 @@ /* Renesas / SuperH specific support for Symbian 32-bit ELF files - Copyright 2004, 2005 + Copyright 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Red Hat @@ -225,7 +225,7 @@ sh_symbian_process_embedded_commands (struct bfd_link_info *info, bfd * abfd, break; case 'I': - if (strncmp (s, DIRECTIVE_IMPORT, strlen (DIRECTIVE_IMPORT))) + if (! CONST_STRNEQ (s, DIRECTIVE_IMPORT)) result = FALSE; else { @@ -261,9 +261,9 @@ sh_symbian_process_embedded_commands (struct bfd_link_info *info, bfd * abfd, name_end_char = * new_name_end; * new_name_end = 0; - /* Check to see if 'AS '... is present. If se we have an IMPORT AS - directive, otherwise we have an IMPORT directive. */ - if (strncmp (s, DIRECTIVE_AS, strlen (DIRECTIVE_AS))) + /* Check to see if 'AS '... is present. If so we have an + IMPORT AS directive, otherwise we have an IMPORT directive. */ + if (! CONST_STRNEQ (s, DIRECTIVE_AS)) { /* Skip the new-line at the end of the name. */ if (SYMBIAN_DEBUG && name_end_char != '\n') @@ -327,7 +327,7 @@ sh_symbian_process_embedded_commands (struct bfd_link_info *info, bfd * abfd, break; case 'E': - if (strncmp (s, DIRECTIVE_EXPORT, strlen (DIRECTIVE_EXPORT))) + if (! CONST_STRNEQ (s, DIRECTIVE_EXPORT)) result = FALSE; else { -- cgit v1.2.1