diff options
author | Max Kellermann <max.kellermann@ionos.com> | 2024-10-04 17:28:43 +0200 |
---|---|---|
committer | Max Kellermann <max.kellermann@ionos.com> | 2024-10-09 23:13:12 +0200 |
commit | cae1af38601df8fccd3d6b32714864bc4ada4334 (patch) | |
tree | 23004d1e1cae9d23369715f6fe86dd41f4741b78 /src | |
parent | Merge pull request #60211 from JonBailey1993/JonBailey1993/ceph_test_rados_io... (diff) | |
download | ceph-cae1af38601df8fccd3d6b32714864bc4ada4334.tar.xz ceph-cae1af38601df8fccd3d6b32714864bc4ada4334.zip |
msg/async/ProtocolV1: use zero-initialization instead of memset()
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/msg/async/ProtocolV1.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/msg/async/ProtocolV1.cc b/src/msg/async/ProtocolV1.cc index b14de7b1e56..27968014ff7 100644 --- a/src/msg/async/ProtocolV1.cc +++ b/src/msg/async/ProtocolV1.cc @@ -90,9 +90,8 @@ void ProtocolV1::connect() { // reset connect state variables authorizer_buf.clear(); - // FIPS zeroization audit 20191115: these memsets are not security related. - memset(&connect_msg, 0, sizeof(connect_msg)); - memset(&connect_reply, 0, sizeof(connect_reply)); + connect_msg = {}; + connect_reply = {}; global_seq = messenger->get_global_seq(); } @@ -1572,8 +1571,7 @@ CtPtr ProtocolV1::handle_connect_message_write(int r) { CtPtr ProtocolV1::wait_connect_reply() { ldout(cct, 20) << __func__ << dendl; - // FIPS zeroization audit 20191115: this memset is not security related. - memset(&connect_reply, 0, sizeof(connect_reply)); + connect_reply = {}; return READ(sizeof(connect_reply), handle_connect_reply_1); } @@ -1923,8 +1921,7 @@ CtPtr ProtocolV1::handle_client_banner(char *buffer, int r) { CtPtr ProtocolV1::wait_connect_message() { ldout(cct, 20) << __func__ << dendl; - // FIPS zeroization audit 20191115: this memset is not security related. - memset(&connect_msg, 0, sizeof(connect_msg)); + connect_msg = {}; return READ(sizeof(connect_msg), handle_connect_message_1); } @@ -1988,8 +1985,7 @@ CtPtr ProtocolV1::handle_connect_message_2() { ceph_msg_connect_reply reply; ceph::buffer::list authorizer_reply; - // FIPS zeroization audit 20191115: this memset is not security related. - memset(&reply, 0, sizeof(reply)); + reply = {}; reply.protocol_version = messenger->get_proto_version(connection->peer_type, false); @@ -2616,8 +2612,7 @@ CtPtr ProtocolV1::server_ready() { << dendl; ldout(cct, 20) << __func__ << " accept done" << dendl; - // FIPS zeroization audit 20191115: this memset is not security related. - memset(&connect_msg, 0, sizeof(connect_msg)); + connect_msg = {}; if (connection->delay_state) { ceph_assert(connection->delay_state->ready()); |