Re: [PATCH v2 5/7] quote: add sq_quote_argv_pretty_ltrim

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 09.08.19 um 19:13 schrieb Jeff Hostetler:
> On 8/8/2019 6:49 PM, René Scharfe wrote:
>>   void sq_quote_argv_pretty(struct strbuf *dst, const char **argv)
>>   {
>> -    int i;
>> -
>> -    for (i = 0; argv[i]; i++) {
>> -        strbuf_addch(dst, ' ');
>> -        sq_quote_buf_pretty(dst, argv[i]);
>> -    }
>> +    strbuf_addch(dst, ' ');
>
> If I'm reading this correctly, this has slightly different behavior
> than the original version.  Perhaps:
>
>     if (argv[0])
>         strbuf_addch(dst, ' ');

Oh, yes, thanks for spotting this.

René




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux