Re: [PATCH 07/16] list-files: show directories as well as files

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

 



On Tue, Mar 10, 2015 at 1:23 PM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
>> +static int add_directory(struct string_list *result,
>> +                        const char *name)
>> +{
>> +       struct strbuf sb = STRBUF_INIT;
>> +       const char *p;
>> +
>> +       strbuf_add(&sb, name, strlen(name));
>
> strbuf_addstr() perhaps?

Yeah. The previous version of this function takes string length as an
argument, but then I dropped that and used strlen() instead. Thanks
for catching.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]