Commit ab07f722 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #814 from hurtonm/master

Replace assert with zmq_assert
parents 10145016 5d41d51b
...@@ -80,7 +80,7 @@ int zmq::msg_t::init_data (void *data_, size_t size_, msg_free_fn *ffn_, ...@@ -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 ( ...@@ -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_) ...@@ -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 () ...@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment