summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormalosek <malosek@fastmq.com>2009-09-17 11:31:28 +0200
committermalosek <malosek@fastmq.com>2009-09-17 11:31:28 +0200
commitdffbdbb60c5d5caf01d13063a3d1babab0411338 (patch)
tree8a201164dd760fa63b27e09262ff258aee3124bc /src
parent1bd6d5e0f6a6013b2d43abb2a82f0027a92fcc96 (diff)
fixed compiler warning cast from uint64 to bool in socket_base.cpp
Diffstat (limited to 'src')
-rw-r--r--src/socket_base.cpp11
1 files changed, 8 insertions, 3 deletions
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;