mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-17 05:18:49 +00:00
FEXServerClient: Do not use strerror() in ConnectToServer()
This triggers glibc allocation. Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
44213c3968
commit
a1aa2547ce
@ -160,7 +160,7 @@ int ConnectToServer(ConnectionOption ConnectionOption) {
|
||||
// Create the initial unix socket
|
||||
int SocketFD = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
|
||||
if (SocketFD == -1) {
|
||||
LogMan::Msg::EFmt("Couldn't open AF_UNIX socket {} {}", errno, strerror(errno));
|
||||
LogMan::Msg::EFmt("Couldn't open AF_UNIX socket {}", errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ int ConnectToServer(ConnectionOption ConnectionOption) {
|
||||
|
||||
if (connect(SocketFD, reinterpret_cast<struct sockaddr*>(&addr), SizeOfAddr) == -1) {
|
||||
if (ConnectionOption == ConnectionOption::Default || errno != ECONNREFUSED) {
|
||||
LogMan::Msg::EFmt("Couldn't connect to FEXServer socket {} {} {}", ServerSocketName, errno, strerror(errno));
|
||||
LogMan::Msg::EFmt("Couldn't connect to FEXServer socket {} {}", ServerSocketName, errno);
|
||||
}
|
||||
close(SocketFD);
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user