mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-28 07:58:14 +08: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;
|
||||
}
|
||||
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user