mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-31 01:43:02 +08:00
Replace assert with zmq_assert
This commit is contained in:
parent
1014501679
commit
5d41d51ba5
@ -80,7 +80,7 @@ int zmq::msg_t::init_data (void *data_, size_t size_, msg_free_fn *ffn_,
|
|||||||
{
|
{
|
||||||
// If data is NULL and size is not 0, a segfault
|
// If data is NULL and size is not 0, a segfault
|
||||||
// would occur once the data is accessed
|
// would occur once the data is accessed
|
||||||
assert (data_ != NULL || size_ == 0);
|
zmq_assert (data_ != NULL || size_ == 0);
|
||||||
|
|
||||||
file_desc = -1;
|
file_desc = -1;
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ int zmq::proxy (
|
|||||||
else {
|
else {
|
||||||
// This is an API error, we should assert
|
// This is an API error, we should assert
|
||||||
puts ("E: invalid command sent to proxy");
|
puts ("E: invalid command sent to proxy");
|
||||||
assert (false);
|
zmq_assert (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Process a request
|
// Process a request
|
||||||
|
@ -81,7 +81,7 @@ int zmq::req_t::xsend (msg_t *msg_)
|
|||||||
rc = dealer_t::sendpipe (&bottom, &reply_pipe);
|
rc = dealer_t::sendpipe (&bottom, &reply_pipe);
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
return -1;
|
return -1;
|
||||||
assert (reply_pipe);
|
zmq_assert (reply_pipe);
|
||||||
|
|
||||||
message_begins = false;
|
message_begins = false;
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ void zmq::stream_engine_t::terminate ()
|
|||||||
|
|
||||||
void zmq::stream_engine_t::in_event ()
|
void zmq::stream_engine_t::in_event ()
|
||||||
{
|
{
|
||||||
assert (!io_error);
|
zmq_assert (!io_error);
|
||||||
|
|
||||||
// If still handshaking, receive and process the greeting message.
|
// If still handshaking, receive and process the greeting message.
|
||||||
if (unlikely (handshaking))
|
if (unlikely (handshaking))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user