This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Replace DEPRECATED_STREQ
- From: Andreas Schwab <schwab at suse dot de>
- To: Markus Deuling <deuling at de dot ibm dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Wed, 16 Jan 2008 10:59:14 +0100
- Subject: Re: [rfc] Replace DEPRECATED_STREQ
- References: <478DD3EB.3020803@de.ibm.com>
Markus Deuling <deuling@de.ibm.com> writes:
> diff -urpN src/gdb/coffread.c dev/gdb/coffread.c
> --- src/gdb/coffread.c 2008-01-01 23:53:09.000000000 +0100
> +++ dev/gdb/coffread.c 2008-01-16 09:48:28.000000000 +0100
> @@ -198,7 +198,7 @@ coff_locate_sections (bfd *abfd, asectio
>
> csi = (struct coff_symfile_info *) csip;
> name = bfd_get_section_name (abfd, sectp);
> - if (DEPRECATED_STREQ (name, ".text"))
> + if (!strcmp (name, ".text"))
I think you should generally use strcmp (...) == 0, since the return
value is not a boolean.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."