0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 23:01:04 +08:00

Merge pull request #3844 from bluca/format

Problem: msg_t functions do not respect coding style
This commit is contained in:
Simon Giesecke 2020-03-07 14:58:48 +01:00 committed by GitHub
commit 656205b5f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,7 +221,7 @@ int zmq::msg_t::init_leave ()
return 0;
}
int zmq::msg_t::init_subscribe (const size_t size_, const unsigned char *topic)
int zmq::msg_t::init_subscribe (const size_t size_, const unsigned char *topic_)
{
int rc = init_size (size_);
if (rc == 0) {
@ -229,14 +229,14 @@ int zmq::msg_t::init_subscribe (const size_t size_, const unsigned char *topic)
// We explicitly allow a NULL subscription with size zero
if (size_) {
assert (topic);
memcpy (data (), topic, size_);
assert (topic_);
memcpy (data (), topic_, size_);
}
}
return rc;
}
int zmq::msg_t::init_cancel (const size_t size_, const unsigned char *topic)
int zmq::msg_t::init_cancel (const size_t size_, const unsigned char *topic_)
{
int rc = init_size (size_);
if (rc == 0) {
@ -244,8 +244,8 @@ int zmq::msg_t::init_cancel (const size_t size_, const unsigned char *topic)
// We explicitly allow a NULL subscription with size zero
if (size_) {
assert (topic);
memcpy (data (), topic, size_);
assert (topic_);
memcpy (data (), topic_, size_);
}
}
return rc;