This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb.mi/mi-cli.exp failures


Hans-Peter Nilsson <hp at bitrange dot com> writes:

> On Mon, 31 Mar 2003, Andrew Cagney wrote:
> > And this:
> >
> > > -	return concat (filename);
> > > +	return filename;
> >
> > (remembering that the patch is backwards) doesn't look so good.  It
> > should be:
> >
> > 	concat (filename, NULL);
> >
> > perhaps
> >
> > 	xstrdup (filename)
> >
> > would be easier to read :-)
> 
> \begin{chant} There must be no xstrdup calls in bfd.  BFD must
> not abort; it's a library and the caller must handle allocation
> failures.  There may be xstrdup calls in bfd already, but please
> don't add new ones. \end{chant}

Could use strdup, though, not that I know the context here.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]