diff --git a/slsReceiverSoftware/src/ClientInterface.cpp b/slsReceiverSoftware/src/ClientInterface.cpp index f1adf1c79..2bd2be3c6 100755 --- a/slsReceiverSoftware/src/ClientInterface.cpp +++ b/slsReceiverSoftware/src/ClientInterface.cpp @@ -217,7 +217,7 @@ void ClientInterface::modeNotImplemented(const std::string &modename, } template -void ClientInterface::validate(T arg, T retval, std::string modename, +void ClientInterface::validate(T arg, T retval, const std::string& modename, numberMode hex) { if (ret == OK && arg != -1 && retval != arg) { auto format = (hex == HEX) ? std::hex : std::dec; diff --git a/slsReceiverSoftware/src/ClientInterface.h b/slsReceiverSoftware/src/ClientInterface.h index 18ad800ff..ef6d9e317 100755 --- a/slsReceiverSoftware/src/ClientInterface.h +++ b/slsReceiverSoftware/src/ClientInterface.h @@ -45,7 +45,7 @@ class ClientInterface : private virtual slsDetectorDefs { void functionNotImplemented(); void modeNotImplemented(const std::string& modename, int mode); template - void validate(T arg, T retval, std::string modename, numberMode hex); + void validate(T arg, T retval, const std::string& modename, numberMode hex); void verifyLock(); void verifyIdle(sls::ServerInterface &socket); diff --git a/slsReceiverSoftware/src/Fifo.cpp b/slsReceiverSoftware/src/Fifo.cpp index b100fdaec..f0af09abc 100755 --- a/slsReceiverSoftware/src/Fifo.cpp +++ b/slsReceiverSoftware/src/Fifo.cpp @@ -76,18 +76,12 @@ void Fifo::DestroyFifos(){ free(memory); memory = nullptr; } - if (fifoBound) { - delete fifoBound; - fifoBound = nullptr; - } - if (fifoFree) { - delete fifoFree; - fifoFree = nullptr; - } - if (fifoStream) { - delete fifoStream; - fifoStream = nullptr; - } + delete fifoBound; + fifoBound = nullptr; + delete fifoFree; + fifoFree = nullptr; + delete fifoStream; + fifoStream = nullptr; } diff --git a/slsReceiverSoftware/src/ThreadObject.cpp b/slsReceiverSoftware/src/ThreadObject.cpp index c4c426152..4a554e70f 100755 --- a/slsReceiverSoftware/src/ThreadObject.cpp +++ b/slsReceiverSoftware/src/ThreadObject.cpp @@ -66,7 +66,7 @@ void ThreadObject::SetThreadPriority(int priority) { struct sched_param param; param.sched_priority = priority; if (pthread_setschedparam(threadObject->native_handle(), SCHED_FIFO, ¶m) == EPERM) { - if (!index) { + if (index == 0) { FILE_LOG(logWARNING) << "Could not prioritize " << type << " thread. " "(No Root Privileges?)"; }