git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3] remote-curl.c: fix rpc_out()

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Nov 24, 2009, 02:31 UTC
Message-ID
<20091124103130.e1bdf09f.rctay89@gmail.com>
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
Previous: Tay Ray ChuanNext: Shawn O. Pearce
Message 5 of 6 in “http fixes”
  1. 0/2 http fixesTay Ray Chuan, Nov 23, 2009
  2. 0/2 http fixesTay Ray Chuan, Nov 24, 2009
  3. 1/2 Do curl option disabling before enabling new optionsTay Ray Chuan, Nov 24, 2009
  4. 2/2 remote-curl.c: fix rpc_out()Tay Ray Chuan, Nov 24, 2009
  5. remote-curl.c: fix rpc_out()Tay Ray Chuan, Nov 24, 2009
  6. Shawn O. PearceNov 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.