From 3b0e52ae8651f3abb4e8e935d8b7eb3231aae0f4 Mon Sep 17 00:00:00 2001 From: jyelon Date: Thu, 9 Dec 2021 14:55:56 -0500 Subject: [PATCH] Fix incorrect usage of strerror_r --- luprex/core/cpp/driver-linux.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/luprex/core/cpp/driver-linux.cpp b/luprex/core/cpp/driver-linux.cpp index 0e21558c..487321dd 100644 --- a/luprex/core/cpp/driver-linux.cpp +++ b/luprex/core/cpp/driver-linux.cpp @@ -108,8 +108,7 @@ public: return sock; error_errno: - strerror_r(errno, errbuf, 1024); - err = errbuf; + err = strerror_r(errno, errbuf, 1024); error: if (sock != INVALID_SOCKET) close(sock); if (addrs != nullptr) freeaddrinfo(addrs);