X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=src%2Futil%2Fsignal.cc;h=3760e54897dcd772b6a5cb6569b6600cf46e490a;hb=f2d0ed355899d265edbcc7156dace706df2f160a;hp=8e63016fddde41a5cd140ea27d2551b1f9ce4d2b;hpb=5e760300d15ef4c5b7eed3fb9f37920ebca2f6ec;p=awesomized%2Flibmemcached diff --git a/src/util/signal.cc b/src/util/signal.cc index 8e63016f..3760e548 100644 --- a/src/util/signal.cc +++ b/src/util/signal.cc @@ -34,7 +34,7 @@ * */ -#include +#include "mem_config.h" #include #include @@ -122,7 +122,7 @@ SignalThread::~SignalThread() } #if 0 - if (pthread_equal(thread, pthread_self()) != 0 and (pthread_kill(thread, 0) == ESRCH) == true) + if (pthread_equal(thread, pthread_self()) and (pthread_kill(thread, 0) == ESRCH) == true) { void *retval; pthread_join(thread, &retval); @@ -211,13 +211,13 @@ bool SignalThread::setup() set_shutdown(SHUTDOWN_RUNNING); int error; - if ((error= pthread_sigmask(SIG_BLOCK, &set, NULL)) != 0) + if ((error= pthread_sigmask(SIG_BLOCK, &set, NULL))) { std::cerr << "pthread_sigmask() died during pthread_sigmask(" << strerror(error) << ")" << std::endl; return false; } - if ((error= pthread_create(&thread, NULL, &sig_thread, this)) != 0) + if ((error= pthread_create(&thread, NULL, &sig_thread, this))) { std::cerr << "pthread_create() died during pthread_create(" << strerror(error) << ")" << std::endl; return false;