All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Kim Gybels <kgybels@infogroep.be>, Git List <git@vger.kernel.org>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Karsten Blees <blees@dcon.de>, Johannes Sixt <j6t@kdbg.org>
Subject: Re: [PATCH] diff: ensure correct lifetime of external_diff_cmd
Date: Thu, 10 Jan 2019 10:27:15 -0800	[thread overview]
Message-ID: <xmqqh8eg2wsc.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAPig+cQKnEWb+co_NJ0UyZbXZrvx2KsbS_ZugdyjjYZcz8tjvw@mail.gmail.com> (Eric Sunshine's message of "Wed, 9 Jan 2019 18:10:58 -0500")

Eric Sunshine <sunshine@sunshineco.com> 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.

  parent reply	other threads:[~2019-01-10 18:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09 22:10 [PATCH] diff: ensure correct lifetime of external_diff_cmd Kim Gybels
2019-01-09 23:10 ` Eric Sunshine
2019-01-10 15:47   ` Johannes Schindelin
2019-01-10 18:27   ` Junio C Hamano [this message]
2019-01-11 20:26 ` [PATCH v2] " Kim Gybels
2019-01-12  2:44   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqh8eg2wsc.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=blees@dcon.de \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=kgybels@infogroep.be \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.