From ce6c5fc3de38ab42173d85c3c91bb2ac34a0f792 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 3 Jul 2019 09:59:46 +0100 Subject: Fix not expanding correctly. --- src/inspircd.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 29cd8acf2..70e5fcf38 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -190,9 +190,7 @@ void InspIRCd::WritePID(const std::string& filename, bool exitonfail) return; } - std::string fname(filename); - if (fname.empty()) - fname = ServerInstance->Config->Paths.PrependData("inspircd.pid"); + std::string fname = ServerInstance->Config->Paths.PrependData(filename.empty() ? "inspircd.pid" : filename); std::ofstream outfile(fname.c_str()); if (outfile.is_open()) { -- cgit v1.3.1-10-gc9f91