From f8b476282eb4f430ca2b857a6b13f413953ad895 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Wed, 4 Sep 2019 12:38:43 +0000 Subject: [PATCH] [lldb] Fix log statement in Socket::Write We change num_bytes in this method, so this doesn't actually log the parameter that we called the function with. No test as we don't test logging code. llvm-svn: 370887 --- lldb/source/Host/common/Socket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lldb/source/Host/common/Socket.cpp b/lldb/source/Host/common/Socket.cpp index 9ce36d0..525727e 100644 --- a/lldb/source/Host/common/Socket.cpp +++ b/lldb/source/Host/common/Socket.cpp @@ -353,6 +353,7 @@ Status Socket::Read(void *buf, size_t &num_bytes) { } Status Socket::Write(const void *buf, size_t &num_bytes) { + const size_t src_len = num_bytes; Status error; int bytes_sent = 0; do { @@ -372,7 +373,7 @@ Status Socket::Write(const void *buf, size_t &num_bytes) { ", src = %p, src_len = %" PRIu64 ", flags = 0) => %" PRIi64 " (error = %s)", static_cast(this), static_cast(m_socket), buf, - static_cast(num_bytes), + static_cast(src_len), static_cast(bytes_sent), error.AsCString()); } -- 2.7.4