mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-26 18:42:43 +01:00
Remove unnecessary casts
This commit is contained in:
@@ -454,7 +454,7 @@ size_t zmq::pgm_socket_t::send (unsigned char *data_, size_t data_len_)
|
|||||||
// We have to write all data as one packet.
|
// We have to write all data as one packet.
|
||||||
if (nbytes > 0) {
|
if (nbytes > 0) {
|
||||||
zmq_assert (status == PGM_IO_STATUS_NORMAL);
|
zmq_assert (status == PGM_IO_STATUS_NORMAL);
|
||||||
zmq_assert ((ssize_t) nbytes == (ssize_t) data_len_);
|
zmq_assert (nbytes == data_len_);
|
||||||
} else {
|
} else {
|
||||||
zmq_assert (status == PGM_IO_STATUS_RATE_LIMITED ||
|
zmq_assert (status == PGM_IO_STATUS_RATE_LIMITED ||
|
||||||
status == PGM_IO_STATUS_WOULD_BLOCK);
|
status == PGM_IO_STATUS_WOULD_BLOCK);
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ int zmq::stream_engine_t::write (const void *data_, size_t size_)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
wsa_assert (nbytes != SOCKET_ERROR);
|
wsa_assert (nbytes != SOCKET_ERROR);
|
||||||
return (size_t) nbytes;
|
return nbytes;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -354,7 +354,7 @@ int zmq::stream_engine_t::read (void *data_, size_t size_)
|
|||||||
if (nbytes == 0)
|
if (nbytes == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return (size_t) nbytes;
|
return nbytes;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user