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

[PATCH 1/2] pkt-line: fix declaration of `set_packet_header()`

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
May 13, 2019, 22:43 UTC
Message-ID
<a6bfec76c85bbe9187b536ff78252b82e30e20d3.1557787395.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.192.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

When this function was changed in a97d00799a19 (remote-curl: use post_rpc() for protocol v2 also, 2019-02-21) from file-local to global, the declaration was incorrectly missing the `const` qualifier.

Let's fix that.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 pkt-line.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkt-line.h b/pkt-line.h
index 5c62015db4..04ae7d802c 100644
--- a/pkt-line.h
+++ b/pkt-line.h
@@ -25,7 +25,7 @@ void packet_delim(int fd);
 void packet_write_fmt(int fd, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
 void packet_buf_flush(struct strbuf *buf);
 void packet_buf_delim(struct strbuf *buf);
-void set_packet_header(char *buf, int size);
+void set_packet_header(char *buf, const int size);
 void packet_write(int fd_out, const char *buf, size_t size);
 void packet_buf_write(struct strbuf *buf, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
 void packet_buf_write_len(struct strbuf *buf, const char *data, size_t len);
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Junio C Hamano
Message 2 of 15 in “pkt-line: fix incorrect function declaration”
  1. 0/2 pkt-line: fix incorrect function declarationJohannes Schindelin via GitGitGadget, May 13, 2019
  2. 1/2 pkt-line: fix declaration of `set_packet_header()`Johannes Schindelin via GitGitGadget, May 13, 2019
  3. Junio C HamanoMay 13, 2019
  4. Johannes SchindelinMay 14, 2019
  5. Jeff KingMay 14, 2019
  6. Jeff KingMay 14, 2019
  7. Junio C HamanoMay 15, 2019
  8. Jeff KingMay 15, 2019
  9. Johannes SchindelinMay 15, 2019
  10. Junio C HamanoMay 16, 2019
  11. Jeff KingMay 16, 2019
  12. Junio C HamanoMay 16, 2019
  13. Johannes SchindelinMay 17, 2019
  14. 2/2 parse-options: adjust `parse_opt_unknown_cb()`s declared return typeJohannes Schindelin via GitGitGadget, May 13, 2019
  15. Junio C HamanoMay 13, 2019

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.