PATCH: Return NULL on NULL bfd (Problem with linker with binutils-040414)

Daniel Jacobowitz drow@false.org
Tue Apr 20 14:44:00 GMT 2004


On Tue, Apr 20, 2004 at 08:54:32AM +0100, Nick Clifton wrote:
> Hi H. J.
> 
> >How about this patch?
> >
> >
> >H.J.
> >----
> >2004-04-19  H.J. Lu  <hongjiu.lu@intel.com>
> >
> >	* bfd.c (bfd_archive_filename): Return NULL on NULL bfd.
> >
> > 
> >
> This version of your patch (returning NULL) is approved for the 
> mainline, and I suspect that Daniel will approve it for the branch.
> 
> I agree that returning a NULL here can delay the detection of a problem, 
> but that will be because of poor coding (ie not checking the return 
> value of bfd_archive_filename) and in such cases the programmer gets 
> what they deserve.

Yes, this is fine if someone wants to apply it to the branch.  Thanks.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Binutils mailing list