summaryrefslogtreecommitdiff
path: root/src/net/ipc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ipc.cpp')
-rw-r--r--src/net/ipc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/ipc.cpp b/src/net/ipc.cpp
index 407f8ca3b..2f910eaed 100644
--- a/src/net/ipc.cpp
+++ b/src/net/ipc.cpp
@@ -165,8 +165,9 @@ void IPC::start()
return;
unsigned short port(44007);
- if (getenv("IPC_PORT") != nullptr)
- port = static_cast<unsigned short>(atoi(getenv("IPC_PORT")));
+ const char *const portStr = getenv("IPC_PORT");
+ if (portStr != nullptr)
+ port = static_cast<unsigned short>(atoi(portStr));
logger->log("Starting IPC...");
ipc = new IPC;