mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-05 10:43:19 +08:00
Use zmq_assert rather then assert
This commit is contained in:
parent
52ed4cdccf
commit
a8f9a0d891
@ -70,7 +70,7 @@ zmq::devpoll_t::handle_t zmq::devpoll_t::add_fd (fd_t fd_,
|
||||
}
|
||||
}
|
||||
|
||||
assert (!fd_table [fd_].valid);
|
||||
zmq_assert (!fd_table [fd_].valid);
|
||||
|
||||
fd_table [fd_].events = 0;
|
||||
fd_table [fd_].reactor = reactor_;
|
||||
@ -88,7 +88,7 @@ zmq::devpoll_t::handle_t zmq::devpoll_t::add_fd (fd_t fd_,
|
||||
|
||||
void zmq::devpoll_t::rm_fd (handle_t handle_)
|
||||
{
|
||||
assert (fd_table [handle_].valid);
|
||||
zmq_assert (fd_table [handle_].valid);
|
||||
|
||||
devpoll_ctl (handle_, POLLREMOVE);
|
||||
fd_table [handle_].valid = false;
|
||||
|
@ -57,7 +57,7 @@ zmq::poll_t::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_)
|
||||
|
||||
pollfd pfd = {fd_, 0, 0};
|
||||
pollset.push_back (pfd);
|
||||
assert (fd_table [fd_].index == retired_fd);
|
||||
zmq_assert (fd_table [fd_].index == retired_fd);
|
||||
|
||||
fd_table [fd_].index = pollset.size() - 1;
|
||||
fd_table [fd_].events = events_;
|
||||
@ -71,7 +71,7 @@ zmq::poll_t::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_)
|
||||
void zmq::poll_t::rm_fd (handle_t handle_)
|
||||
{
|
||||
fd_t index = fd_table [handle_].index;
|
||||
assert (index != retired_fd);
|
||||
zmq_assert (index != retired_fd);
|
||||
|
||||
// Mark the fd as unused.
|
||||
pollset [index].fd = retired_fd;
|
||||
|
@ -219,8 +219,8 @@ int zmq::router_t::xrecv (msg_t *msg_, int flags_)
|
||||
}
|
||||
|
||||
// Identity is not expected
|
||||
assert ((msg_->flags () & msg_t::identity) == 0);
|
||||
assert (pipe != NULL);
|
||||
zmq_assert ((msg_->flags () & msg_t::identity) == 0);
|
||||
zmq_assert (pipe != NULL);
|
||||
|
||||
// If we are in the middle of reading a message, just return the next part.
|
||||
if (more_in)
|
||||
@ -273,7 +273,7 @@ bool zmq::router_t::xhas_in ()
|
||||
return false;
|
||||
|
||||
// Identity is not expected
|
||||
assert ((prefetched_msg.flags () & msg_t::identity) == 0);
|
||||
zmq_assert ((prefetched_msg.flags () & msg_t::identity) == 0);
|
||||
|
||||
blob_t identity = pipe->get_identity ();
|
||||
rc = prefetched_id.init_size (identity.size ());
|
||||
|
Loading…
x
Reference in New Issue
Block a user