summaryrefslogtreecommitdiff
path: root/src/managers/EventManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/EventManager.cpp')
-rw-r--r--src/managers/EventManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/EventManager.cpp b/src/managers/EventManager.cpp
index e0d8704b..c4c6c5d7 100644
--- a/src/managers/EventManager.cpp
+++ b/src/managers/EventManager.cpp
@@ -26,7 +26,7 @@ CEventManager::CEventManager() : m_socketFD(socket(AF_UNIX, SOCK_STREAM | SOCK_C
strncpy(SERVERADDRESS.sun_path, PATH.c_str(), sizeof(SERVERADDRESS.sun_path) - 1);
- if (bind(m_socketFD.get(), (sockaddr*)&SERVERADDRESS, SUN_LEN(&SERVERADDRESS)) < 0) {
+ if (bind(m_socketFD.get(), rc<sockaddr*>(&SERVERADDRESS), SUN_LEN(&SERVERADDRESS)) < 0) {
Debug::log(ERR, "Couldn't bind the Hyprland Socket 2. (3) IPC will not work.");
return;
}
@@ -70,7 +70,7 @@ int CEventManager::onServerEvent(int fd, uint32_t mask) {
sockaddr_in clientAddress;
socklen_t clientSize = sizeof(clientAddress);
- CFileDescriptor ACCEPTEDCONNECTION{accept4(m_socketFD.get(), (sockaddr*)&clientAddress, &clientSize, SOCK_CLOEXEC | SOCK_NONBLOCK)};
+ CFileDescriptor ACCEPTEDCONNECTION{accept4(m_socketFD.get(), rc<sockaddr*>(&clientAddress), &clientSize, SOCK_CLOEXEC | SOCK_NONBLOCK)};
if (!ACCEPTEDCONNECTION.isValid()) {
if (errno != EAGAIN) {
Debug::log(ERR, "Socket2 failed receiving connection, errno: {}", errno);