From 7ba77bf0afa52b384dae6af5c4d886d3b1acd8e6 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Mon, 7 May 2018 16:11:12 -0400 Subject: [PATCH] client: Do not memset frag_info_t and inode_t They do a perfectly good job of initializing themselves. Signed-off-by: Adam C. Emerson (cherry picked from commit d5adb05a249b66a4ce909e0157178d83bc5abbb6) --- src/client/SyntheticClient.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/client/SyntheticClient.cc b/src/client/SyntheticClient.cc index 502d251d19dbc..6979dc7bb97b6 100644 --- a/src/client/SyntheticClient.cc +++ b/src/client/SyntheticClient.cc @@ -1595,7 +1595,6 @@ int SyntheticClient::full_walk(string& basedir) list statq; dirq.push_back(basedir); frag_info_t empty; - memset(&empty, 0, sizeof(empty)); statq.push_back(empty); ceph::unordered_map nlink; @@ -3358,7 +3357,6 @@ int SyntheticClient::chunk_file(string &filename) dout(0) << "file " << filename << " size is " << size << dendl; inode_t inode{}; - memset(&inode, 0, sizeof(inode)); inode.ino = st.st_ino; ret = client->fdescribe_layout(fd, &inode.layout); assert(ret == 0); // otherwise fstat did a bad thing -- 2.39.5