From: Jeff Hostetler via GitGitGadget Date: Tue, 12 Jan 2021 15:31:23 GMT Subject: [PATCH 01/10] pkt-line: use stack rather than static buffer in packet_write_gently() Message-ID: <1155a45cf64afb237204429cd4ff2e74f5f7602a.1610465492.git.gitgitgadget@gmail.com> In-Reply-To: From: Jeff Hostetler Teach packet_write_gently() to use a stack buffer rather than a static buffer when composing the packet line message. This helps get us ready for threaded operations. Signed-off-by: Jeff Hostetler --- pkt-line.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkt-line.c b/pkt-line.c index d633005ef74..98439a2fed0 100644 --- a/pkt-line.c +++ b/pkt-line.c @@ -196,7 +196,7 @@ int packet_write_fmt_gently(int fd, const char *fmt, ...) static int packet_write_gently(const int fd_out, const char *buf, size_t size) { - static char packet_write_buffer[LARGE_PACKET_MAX]; + char packet_write_buffer[LARGE_PACKET_MAX]; size_t packet_size; if (size > sizeof(packet_write_buffer) - 4) -- gitgitgadget