From: Jeff Hostetler <redacted>
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 <redacted>
---
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