aboutsummaryrefslogtreecommitdiff
path: root/bfd/vms-hdr.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
commit0112cd268b205d8176b8b4d00988a334822956cf (patch)
tree67d11340ff93c7dbc29c8917bc03d9d24555f43d /bfd/vms-hdr.c
parent4fa3602bd53183badf1d259128a5f951f32db8cb (diff)
downloadgdb-0112cd268b205d8176b8b4d00988a334822956cf.zip
gdb-0112cd268b205d8176b8b4d00988a334822956cf.tar.gz
gdb-0112cd268b205d8176b8b4d00988a334822956cf.tar.bz2
* 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/vms-hdr.c')
-rw-r--r--bfd/vms-hdr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/vms-hdr.c b/bfd/vms-hdr.c
index 24a0aec..67c22b3 100644
--- a/bfd/vms-hdr.c
+++ b/bfd/vms-hdr.c
@@ -1,6 +1,6 @@
/* vms-hdr.c -- BFD back-end for VMS/VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
Free Software Foundation, Inc.
HDR record handling functions
@@ -248,7 +248,7 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype)
/* LMN. */
_bfd_vms_output_begin (abfd, EOBJ_S_C_EMH, EMH_S_C_LNM);
- _bfd_vms_output_dump (abfd, (unsigned char *)"GAS proGIS", 10);
+ _bfd_vms_output_dump (abfd, (unsigned char *) STRING_COMMA_LEN ("GAS proGIS"));
_bfd_vms_output_flush (abfd);
/* SRC. */
@@ -260,7 +260,7 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype)
if (symbol->flags & BSF_FILE)
{
- if (strncmp ((char *)symbol->name, "<CASE:", 6) == 0)
+ if (CONST_STRNEQ ((char *)symbol->name, "<CASE:"))
{
PRIV (flag_hash_long_names) = symbol->name[6] - '0';
PRIV (flag_show_after_trunc) = symbol->name[7] - '0';
@@ -280,13 +280,13 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype)
}
if (symnum == abfd->symcount)
- _bfd_vms_output_dump (abfd, (unsigned char *)"noname", 6);
+ _bfd_vms_output_dump (abfd, (unsigned char *) STRING_COMMA_LEN ("noname"));
_bfd_vms_output_flush (abfd);
/* TTL. */
_bfd_vms_output_begin (abfd, EOBJ_S_C_EMH, EMH_S_C_TTL);
- _bfd_vms_output_dump (abfd, (unsigned char *)"TTL", 3);
+ _bfd_vms_output_dump (abfd, (unsigned char *) STRING_COMMA_LEN ("TTL"));
_bfd_vms_output_flush (abfd);
/* CPR. */