From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Stefan Beller <stefanbeller@googlemail.com>,
Jens.Lehmann@web.de, git@vger.kernel.org
Subject: Re: [PATCH] diff: remove another ternary expression always evaluating to true
Date: Thu, 08 Aug 2013 15:03:25 -0700 [thread overview]
Message-ID: <7v8v0b96xe.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.1.00.1308082335050.24252@s15462909.onlinehome-server.info> (Johannes Schindelin's message of "Thu, 8 Aug 2013 23:36:28 +0200 (CEST)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Hi Stefan,
>
> On Thu, 8 Aug 2013, Stefan Beller wrote:
>
>> So you rather propose to have
>> - show_submodule_summary(o->file, one ? one->path : two->path,
>> + show_submodule_summary(o->file, one->path ? one->path : two->path,
>
> I do. The reason is that one->path could be NULL (but not both one->path
> and two->path) and the summary would not be as helpful as possible if it
> wrote "(null)" instead of the path of the submodule.
Good.
Also some C libraries would choke when asked to %s format a NULL,
instead of giving "(null)" to avoid segfaulting (which I think is a
quirk in glibc).
next prev parent reply other threads:[~2013-08-08 22:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 18:55 [PATCH] diff: remove another ternary expression always evaluating to true Stefan Beller
2013-08-08 21:01 ` Johannes Schindelin
2013-08-08 21:22 ` Stefan Beller
2013-08-08 21:36 ` Johannes Schindelin
2013-08-08 22:03 ` Junio C Hamano [this message]
2013-08-08 22:11 ` [PATCH] diff: fix a possible null pointer dereference Stefan Beller
2013-08-08 21:36 ` [PATCH] diff: remove another ternary expression always evaluating to true Philip Oakley
2013-08-08 22:17 ` Stefan Beller
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=7v8v0b96xe.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Jens.Lehmann@web.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=stefanbeller@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).