Fixed sizeof usage in man pages

This commit is contained in:
Pieter Hintjens 2013-05-15 14:11:15 +02:00
parent 593010fbeb
commit 8ea779c8f7
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);