mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-29 20:59:47 +01:00
Problem: pointee types are unnecessarily non-const
Solution: add const where possible
This commit is contained in:
@@ -545,7 +545,8 @@ int zmq::zmtp_engine_t::process_command_message (msg_t *msg_)
|
||||
if (unlikely (msg_->size () < cmd_name_size + sizeof (cmd_name_size)))
|
||||
return -1;
|
||||
|
||||
uint8_t *cmd_name = (static_cast<uint8_t *> (msg_->data ())) + 1;
|
||||
const uint8_t *const cmd_name =
|
||||
static_cast<const uint8_t *> (msg_->data ()) + 1;
|
||||
if (cmd_name_size == ping_name_size
|
||||
&& memcmp (cmd_name, "PING", cmd_name_size) == 0)
|
||||
msg_->set_flags (zmq::msg_t::ping);
|
||||
|
||||
Reference in New Issue
Block a user