From: Erik Faye-Lund <kusmabite@googlemail.com>
To: "Gary V. Vaughan" <git@mlists.thewrittenword.com>
Cc: git@vger.kernel.org
Subject: Re: [patch 02/16] const-expr.patch
Date: Tue, 27 Apr 2010 16:08:24 +0200 [thread overview]
Message-ID: <l2t40aa078e1004270708w905ae1e1lbead0f21acc70dee@mail.gmail.com> (raw)
In-Reply-To: <20100427135812.656626000@mlists.thewrittenword.com>
On Tue, Apr 27, 2010 at 3:57 PM, Gary V. Vaughan
<git@mlists.thewrittenword.com> wrote:
> Index: b/unpack-trees.c
> ===================================================================
> --- a/unpack-trees.c
> +++ b/unpack-trees.c
> @@ -287,9 +287,11 @@ static void add_same_unmerged(struct cac
> static int unpack_index_entry(struct cache_entry *ce,
> struct unpack_trees_options *o)
> {
> - struct cache_entry *src[5] = { ce, NULL, };
> + struct cache_entry *src[5] = { NULL, NULL };
You don't need NULL twice when the array-size is specified, it's just
confusing as the array has 5 elements.
> Index: b/builtin/commit.c
> ===================================================================
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -717,7 +717,8 @@ static int prepare_to_commit(const char
>
> if (use_editor) {
> char index[PATH_MAX];
> - const char *env[2] = { index, NULL };
> + const char *env[] = { NULL, NULL };
Why not "const char *env[2] = { NULL };", as it's shorter?
> Index: b/builtin/cat-file.c
> ===================================================================
> --- a/builtin/cat-file.c
> +++ b/builtin/cat-file.c
> @@ -118,7 +118,9 @@ static int cat_one_file(int opt, const c
>
> /* custom pretty-print here */
> if (type == OBJ_TREE) {
> - const char *ls_args[3] = {"ls-tree", obj_name, NULL};
> + const char *ls_args[3] = { NULL, NULL, NULL };
Again, you don't need to repeat NULL.
--
Erik "kusma" Faye-Lund
next prev parent reply other threads:[~2010-04-27 14:08 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 13:57 [patch 00/16] Portability Patches for git-1.7.1 (v4) Gary V. Vaughan
2010-04-27 13:57 ` [patch 01/16] user-cppflags.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 02/16] const-expr.patch Gary V. Vaughan
2010-04-27 14:08 ` Erik Faye-Lund [this message]
2010-04-27 14:32 ` Gary V. Vaughan
[not found] ` <1AFA5FB2-EB8B-4775-8941-86428C7F740E@gmail.com>
2010-05-03 1:39 ` Gary V. Vaughan
[not found] ` <A4E8B513-AD31-4F3B-9DEF-6A85AA8DC7B3@gmail.com>
2010-05-04 5:01 ` Gary V. Vaughan
2010-04-27 13:57 ` [patch 03/16] pthread.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 04/16] Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX 5.1 fails to compile git Gary V. Vaughan
2010-04-27 16:08 ` Tor Arntsen
2010-04-28 8:40 ` Gary V. Vaughan
2010-04-28 8:55 ` Tor Arntsen
2010-04-28 16:23 ` Jeff King
2010-04-27 13:57 ` [patch 05/16] diff-export.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 06/16] diff-test_cmp.patch Gary V. Vaughan
2010-04-27 17:15 ` Jonathan Nieder
2010-04-28 9:00 ` Gary V. Vaughan
2010-04-28 9:51 ` Jonathan Nieder
2010-04-28 10:22 ` Gary V. Vaughan
2010-04-28 17:43 ` Jonathan Nieder
2010-04-27 13:57 ` [patch 07/16] diff-defaults.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 08/16] host-SunOS56.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 09/16] host-IRIX.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 10/16] host-HPUX10.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 11/16] host-HPUX11.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 12/16] host-OSF1.patch Gary V. Vaughan
2010-04-27 14:10 ` Tor Arntsen
2010-04-27 14:39 ` Gary V. Vaughan
2010-04-27 14:48 ` Tor Arntsen
2010-04-28 9:07 ` Gary V. Vaughan
2010-04-27 13:57 ` [patch 13/16] no-hstrerror.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 14/16] no-inet_ntop.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 15/16] no-socklen_t.patch Gary V. Vaughan
2010-04-27 13:57 ` [patch 16/16] no-inline.patch Gary V. Vaughan
2010-04-27 15:30 ` [patch 00/16] Portability Patches for git-1.7.1 (v4) Michael J Gruber
2010-04-27 17:54 ` Jeff King
2010-04-27 20:13 ` Andreas Schwab
2010-04-28 2:08 ` Jeff King
2010-04-28 9:19 ` Gary V. Vaughan
2010-04-28 12:17 ` Jeff King
2010-04-28 9:27 ` Gary V. Vaughan
2010-04-28 9:32 ` Gary V. Vaughan
2010-04-28 12:26 ` Ævar Arnfjörð Bjarmason
[not found] ` <4BD94599.5090309@drmicha.warpmail.net>
2010-04-29 10:50 ` Gary V. Vaughan
2010-05-01 18:34 ` Michael J Gruber
2010-05-01 23:25 ` Junio C Hamano
2010-05-03 1:48 ` Gary V. Vaughan
2010-05-02 13:00 ` Øyvind A. Holm
2010-04-28 10:12 ` Gary V. Vaughan
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=l2t40aa078e1004270708w905ae1e1lbead0f21acc70dee@mail.gmail.com \
--to=kusmabite@googlemail.com \
--cc=git@mlists.thewrittenword.com \
--cc=git@vger.kernel.org \
--cc=kusmabite@gmail.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).