From dffbdbb60c5d5caf01d13063a3d1babab0411338 Mon Sep 17 00:00:00 2001 From: malosek Date: Thu, 17 Sep 2009 11:31:28 +0200 Subject: fixed compiler warning cast from uint64 to bool in socket_base.cpp --- src/socket_base.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 9806465..bb8e7c9 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -163,9 +163,14 @@ int zmq::socket_base_t::setsockopt (int option_, const void *optval_, return -1; } - if ((int64_t) *((int64_t*) optval_) == 0 || - (int64_t) *((int64_t*) optval_) == 1) { - options.use_multicast_loop = (bool) *((int64_t*) optval_); + if ((int64_t) *((int64_t*) optval_) == 0) { + + options.use_multicast_loop = false; + + } else if ((int64_t) *((int64_t*) optval_) == 1) { + + options.use_multicast_loop = true; + } else { errno = EINVAL; return -1; -- cgit v1.2.3