0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 08:39:42 +08:00

Problem: integer literals assigned to bool variables

Solution: replace by bool literals
This commit is contained in:
Simon Giesecke 2018-05-25 23:03:52 +02:00
parent eacc805646
commit 21498700ef
4 changed files with 5 additions and 5 deletions

View File

@ -107,7 +107,7 @@ int zmq::lb_t::sendpipe (msg_t *msg_, pipe_t **pipe_)
// Application should handle this as suitable // Application should handle this as suitable
if (more) { if (more) {
pipes[current]->rollback (); pipes[current]->rollback ();
more = 0; more = false;
errno = EAGAIN; errno = EAGAIN;
return -1; return -1;
} }

View File

@ -209,7 +209,7 @@ zmq::options_t::options_t () :
maxmsgsize (-1), maxmsgsize (-1),
rcvtimeo (-1), rcvtimeo (-1),
sndtimeo (-1), sndtimeo (-1),
ipv6 (0), ipv6 (false),
immediate (0), immediate (0),
filter (false), filter (false),
invert_matching (false), invert_matching (false),

View File

@ -441,9 +441,9 @@ void zmq::session_base_t::engine_error (
case stream_engine_t::protocol_error: case stream_engine_t::protocol_error:
if (pending) { if (pending) {
if (pipe) if (pipe)
pipe->terminate (0); pipe->terminate (false);
if (zap_pipe) if (zap_pipe)
zap_pipe->terminate (0); zap_pipe->terminate (false);
} else { } else {
terminate (); terminate ();
} }

View File

@ -162,7 +162,7 @@ int zmq::xpub_t::xsetsockopt (int option_,
} }
if (option_ == ZMQ_XPUB_VERBOSE) { if (option_ == ZMQ_XPUB_VERBOSE) {
verbose_subs = (*static_cast<const int *> (optval_) != 0); verbose_subs = (*static_cast<const int *> (optval_) != 0);
verbose_unsubs = 0; verbose_unsubs = false;
} else if (option_ == ZMQ_XPUB_VERBOSER) { } else if (option_ == ZMQ_XPUB_VERBOSER) {
verbose_subs = (*static_cast<const int *> (optval_) != 0); verbose_subs = (*static_cast<const int *> (optval_) != 0);
verbose_unsubs = verbose_subs; verbose_unsubs = verbose_subs;