Commit dffbdbb6 authored by malosek's avatar malosek

fixed compiler warning cast from uint64 to bool in socket_base.cpp

parent 1bd6d5e0
...@@ -163,9 +163,14 @@ int zmq::socket_base_t::setsockopt (int option_, const void *optval_, ...@@ -163,9 +163,14 @@ int zmq::socket_base_t::setsockopt (int option_, const void *optval_,
return -1; return -1;
} }
if ((int64_t) *((int64_t*) optval_) == 0 || if ((int64_t) *((int64_t*) optval_) == 0) {
(int64_t) *((int64_t*) optval_) == 1) {
options.use_multicast_loop = (bool) *((int64_t*) optval_); options.use_multicast_loop = false;
} else if ((int64_t) *((int64_t*) optval_) == 1) {
options.use_multicast_loop = true;
} else { } else {
errno = EINVAL; errno = EINVAL;
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment