From: Junio C Hamano <gitster@pobox.com>
To: David Miller <davem@davemloft.net>
Cc: raa.lkml@gmail.com, git@vger.kernel.org
Subject: Re: testsuite failures in mainline...
Date: Fri, 14 Dec 2007 15:18:02 -0800 [thread overview]
Message-ID: <7v7ijgq311.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071214.142448.52660507.davem@davemloft.net> (David Miller's message of "Fri, 14 Dec 2007 14:24:48 -0800 (PST)")
David Miller <davem@davemloft.net> writes:
> if (!prefixcmp(key, "branch.")) {
> name = key + 7;
> subkey = strrchr(name, '.');
> branch = make_branch(name, subkey - name);
>
> What if 'subkey' is NULL? I bet that's what happening here.
Wow, good eyes.
It makes me wonder what my C library has been returning during the
tests...
---
remote.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/remote.c b/remote.c
index 3fb0f99..0e00680 100644
--- a/remote.c
+++ b/remote.c
@@ -220,11 +220,11 @@ static int handle_config(const char *key, const char *value)
if (!prefixcmp(key, "branch.")) {
name = key + 7;
subkey = strrchr(name, '.');
- branch = make_branch(name, subkey - name);
if (!subkey)
return 0;
if (!value)
return 0;
+ branch = make_branch(name, subkey - name);
if (!strcmp(subkey, ".remote")) {
branch->remote_name = xstrdup(value);
if (branch == current_branch)
next prev parent reply other threads:[~2007-12-14 23:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 18:43 testsuite failures in mainline David Miller
2007-12-14 19:15 ` Junio C Hamano
2007-12-14 19:17 ` David Miller
2007-12-14 20:10 ` Junio C Hamano
2007-12-14 21:45 ` Alex Riesen
2007-12-14 22:24 ` David Miller
2007-12-14 23:18 ` Junio C Hamano [this message]
2007-12-15 0:08 ` David Miller
2007-12-15 1:18 ` Johannes Schindelin
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=7v7ijgq311.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=davem@davemloft.net \
--cc=git@vger.kernel.org \
--cc=raa.lkml@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 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.