Commit 8ea779c8 authored by Pieter Hintjens's avatar Pieter Hintjens

Fixed sizeof usage in man pages

parent 593010fb
...@@ -91,7 +91,7 @@ zmq_msg_close (&msg); ...@@ -91,7 +91,7 @@ zmq_msg_close (&msg);
.Receiving a multi-part message .Receiving a multi-part message
---- ----
int64_t more; int64_t more;
size_t more_size = sizeof more; size_t more_size = sizeof (more);
do { do {
/* Create an empty 0MQ message to hold the message part */ /* Create an empty 0MQ message to hold the message part */
zmq_msg_t part; zmq_msg_t part;
......
...@@ -89,7 +89,7 @@ zmq_msg_close (&msg); ...@@ -89,7 +89,7 @@ zmq_msg_close (&msg);
.Receiving a multi-part message .Receiving a multi-part message
---- ----
int64_t more; int64_t more;
size_t more_size = sizeof more; size_t more_size = sizeof (more);
do { do {
/* Create an empty 0MQ message to hold the message part */ /* Create an empty 0MQ message to hold the message part */
zmq_msg_t part; zmq_msg_t part;
......
...@@ -533,13 +533,13 @@ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS.CATS", 12); ...@@ -533,13 +533,13 @@ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS.CATS", 12);
int64_t affinity; int64_t affinity;
/* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */ /* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */
affinity = 1; affinity = 1;
rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity); rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof (affinity));
assert (rc); assert (rc);
rc = zmq_bind (socket, "tcp://lo:5555"); rc = zmq_bind (socket, "tcp://lo:5555");
assert (rc); assert (rc);
/* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */ /* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */
affinity = 2; affinity = 2;
rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity); rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof (affinity));
assert (rc); assert (rc);
rc = zmq_bind (socket, "tcp://lo:5556"); rc = zmq_bind (socket, "tcp://lo:5556");
assert (rc); assert (rc);
......
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