[illumos-Developer] Webrev for bug 900: sed errors when -e is given a 0-length argument

Garrett D'Amore garrett at nexenta.com
Wed Apr 27 19:32:42 PDT 2011


Doesn't fbsd also have asprintf?

Gary Mills <mills at cc.umanitoba.ca> wrote:

>On Wed, Apr 27, 2011 at 09:00:13PM -0400, Gordon Ross wrote:
>> On Wed, Apr 27, 2011 at 8:24 PM, Gary Mills <mills at cc.umanitoba.ca> wrote:
>> > This is for illumos bug 900: sed errors when -e is given a 0-length
>> > argument.  My webrev is at:
>> >
>> >    http://cr.illumos.org/view/vl7thda0/illumos900/
>> 
>> Thanks for debugging this.  Good find.  However,
>> I think I'd prefer to see the asprintf preserved, and
>> simply correct the check of it's return value, which
>> should be like this:
>> 
>> 			if (asprintf(&temp_arg, "%s\n", optarg) < 0)
>> 				err(1, "asprintf");
>
>That is one of the alternatives suggested in the bug report.  I opted
>for the other one to minimize the porting changes.
>
>-- 
>-Gary Mills-        -Unix Group-        -Computer and Network Services-
>
>_______________________________________________
>Developer mailing list
>Developer at lists.illumos.org
>http://lists.illumos.org/m/listinfo/developer


More information about the Developer mailing list