Re: [PATCH v2] ls-files: adding support for submodules

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

 



>  static void write_name(const char *name)
>  {
>         /*
> +        * NEEDSWORK: To make this thread-safe, full_name would have to be owned
> +        * by the caller.
> +        *
> +        * full_name get reused across output lines to minimize the allocation
> +        * churn.
> +        */
> +       static struct strbuf full_name = STRBUF_INIT;
> +       if (output_path_prefix != '\0') {

It was pointed out to me that this should be:
    if (*output_path_prefix != '\0') {


> +               strbuf_reset(&full_name);
> +               strbuf_addstr(&full_name, output_path_prefix);
> +               strbuf_addstr(&full_name, name);
> +               name = full_name.buf;
> +       }



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