summaryrefslogtreecommitdiff
path: root/bfd/elf32-sh-symbian.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-09-16 18:12:17 +0000
committerNick Clifton <nickc@redhat.com>2006-09-16 18:12:17 +0000
commit2354bf5c588efcc10ae73e52b2150785ed8ce64e (patch)
tree38468012cc35079176a92c9d796fbeb4d353def3 /bfd/elf32-sh-symbian.c
parenta39fb0f1949f476afb48089d2e72e180d0b57300 (diff)
downloadbinutils-redhat-2354bf5c588efcc10ae73e52b2150785ed8ce64e.tar.gz
* 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. * <remainign files>: Make use of the new macros.
Diffstat (limited to 'bfd/elf32-sh-symbian.c')
-rw-r--r--bfd/elf32-sh-symbian.c12
1 files changed, 6 insertions, 6 deletions
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
{