Web lists-archives.com

Re: [PATCH] diff: ensure correct lifetime of external_diff_cmd




Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

> However, you might also consider using xstrdup_or_null(), like this:
>
>     external_diff_cmd = xstrdup_or_null(getenv(...));
>     if (!external_diff_cmd)
>         ...as before...
>
>>         done_preparing = 1;
>>         return external_diff_cmd;
>>  }

Looks good.