git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Tay Ray Chuan <rctay89@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH v2 2/4] xdiff/xprepare: refactor abort cleanups
Date: Wed, 06 Jul 2011 10:57:55 -0700	[thread overview]
Message-ID: <7vliwbmgv0.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1309970337-6016-3-git-send-email-rctay89@gmail.com> (Tay Ray Chuan's message of "Thu, 7 Jul 2011 00:38:55 +0800")

Tay Ray Chuan <rctay89@gmail.com> writes:

> Group free()'s that are called when a malloc() fails in
> xdl_prepare_ctx(), making for more readable code.

Nicer, but I wonder if we can get away with a single label that lets us
abort with freeing whatever we have allocated by making sure that the
various pointer fields and variables are initialized to NULL, which may
lead to even more readable code.

  parent reply	other threads:[~2011-07-06 17:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 16:38 [PATCH v2 0/4] prepare for histogram diff Tay Ray Chuan
2011-07-06 16:38 ` [PATCH v2 1/4] xdiff/xprepare: use memset() Tay Ray Chuan
2011-07-06 16:38   ` [PATCH v2 2/4] xdiff/xprepare: refactor abort cleanups Tay Ray Chuan
2011-07-06 16:38     ` [PATCH v2 3/4] xdiff/xpatience: factor out fall-back-diff function Tay Ray Chuan
2011-07-06 16:38       ` [PATCH v2 4/4] t4033-diff-patience: factor out tests Tay Ray Chuan
2011-07-06 18:04         ` Junio C Hamano
2011-07-06 17:57     ` Junio C Hamano [this message]
2011-07-06 18:10       ` [PATCH v2 2/4] xdiff/xprepare: refactor abort cleanups Tay Ray Chuan
2011-07-06 23:31         ` Junio C Hamano
2011-07-07  3:55           ` Phil Hord
2011-07-07  4:05             ` Tay Ray Chuan
2011-07-07  4:23 ` [PATCH v3 0/4] prepare for histogram diff Tay Ray Chuan
2011-07-07  4:23   ` [PATCH v3 1/4] xdiff/xprepare: use memset() Tay Ray Chuan
2011-07-07  4:23     ` [PATCH v3 2/4] xdiff/xprepare: refactor abort cleanups Tay Ray Chuan
2011-07-07  4:23       ` [PATCH v3 3/4] xdiff/xpatience: factor out fall-back-diff function Tay Ray Chuan
2011-07-07  4:23         ` [PATCH v3 4/4] t4033-diff-patience: factor out tests Tay Ray Chuan

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=7vliwbmgv0.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=rctay89@gmail.com \
    --cc=spearce@spearce.org \
    /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).