mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-17 08:34:00 +00:00
fixed compiler warning cast from uint64 to bool in socket_base.cpp
This commit is contained in:
parent
1bd6d5e0f6
commit
dffbdbb60c
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user