summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-09-11 14:17:57 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-09-11 14:17:57 +0200
commit29c5930d0b9a4a1df3b90819bdfbfff6a66fedd0 (patch)
tree941629c511b5ecc68cd4b8a47c9e7261536fc42c /src
parente0d1294c4bae51a2bc83a09225e89dddc9b6dcf4 (diff)
asserts for invalid indexes in pipe reader & writer added
Diffstat (limited to 'src')
-rw-r--r--src/pipe.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pipe.cpp b/src/pipe.cpp
index a5a18be..6e590df 100644
--- a/src/pipe.cpp
+++ b/src/pipe.cpp
@@ -68,6 +68,7 @@ void zmq::reader_t::set_index (int index_)
int zmq::reader_t::get_index ()
{
+ zmq_assert (index != -1);
return index;
}
@@ -112,6 +113,7 @@ void zmq::writer_t::set_index (int index_)
int zmq::writer_t::get_index ()
{
+ zmq_assert (index != -1);
return index;
}