From: Tay Ray Chuan <rctay89@gmail.com>
To: git@vger.kernel.org
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
"Junio C Hamano" <gitster@pobox.com>,
Sverre Rabbelier <srabbelier@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
paulfred <paul.fredrickson@gmail.com>
Subject: [PATCH v3] remote-curl.c: fix rpc_out()
Date: Tue, 24 Nov 2009 10:31:30 +0800 [thread overview]
Message-ID: <20091124103130.e1bdf09f.rctay89@gmail.com> (raw)
In-Reply-To: <20091124095508.d6312ab0.rctay89@gmail.com>
Remove the extraneous semicolon (';') at the end of the if statement
that allowed the code in its block to execute regardless of the
condition.
This fixes pushing to a smart http backend with chunked encoding.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
---
Reworded the part on code execution, so that it doesn't say "the code
doesn't execute", but rather "the code always executes".
Thanks to Paul for spotting that.
remote-curl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/remote-curl.c b/remote-curl.c
index 69eaf58..a331bae 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -307,7 +307,7 @@ static size_t rpc_out(void *ptr, size_t eltsize,
rpc->len = avail;
}
- if (max < avail);
+ if (max < avail)
avail = max;
memcpy(ptr, rpc->buf + rpc->pos, avail);
rpc->pos += avail;
--
1.6.4.4
next prev parent reply other threads:[~2009-11-24 2:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-23 3:03 [PATCH 0/2] http fixes Tay Ray Chuan
2009-11-24 1:48 ` [PATCH v2 " Tay Ray Chuan
2009-04-14 19:01 ` [PATCH] Do curl option disabling before enabling new options Martin Storsjö
2009-11-23 3:03 ` [PATCH 1/2] " Tay Ray Chuan
2009-11-23 3:05 ` Tay Ray Chuan
2009-11-24 1:50 ` [PATCH v2 " Tay Ray Chuan
2009-11-24 1:55 ` [PATCH v2 2/2] remote-curl.c: fix rpc_out() Tay Ray Chuan
2009-11-24 2:31 ` Tay Ray Chuan [this message]
2009-11-24 22:43 ` [PATCH v3] " Shawn O. Pearce
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=20091124103130.e1bdf09f.rctay89@gmail.com \
--to=rctay89@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=paul.fredrickson@gmail.com \
--cc=spearce@spearce.org \
--cc=srabbelier@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).