]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Do not memset frag_info_t and inode_t
authorAdam C. Emerson <aemerson@redhat.com>
Mon, 7 May 2018 20:11:12 +0000 (16:11 -0400)
committerNathan Cutler <ncutler@suse.com>
Fri, 18 May 2018 13:30:34 +0000 (15:30 +0200)
They do a perfectly good job of initializing themselves.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit d5adb05a249b66a4ce909e0157178d83bc5abbb6)

src/client/SyntheticClient.cc

index 502d251d19dbc4052232d25d7b8586e92e0b221e..6979dc7bb97b612ceb9edf7ae9d1341a76a4213f 100644 (file)
@@ -1595,7 +1595,6 @@ int SyntheticClient::full_walk(string& basedir)
   list<frag_info_t> statq;
   dirq.push_back(basedir);
   frag_info_t empty;
-  memset(&empty, 0, sizeof(empty));
   statq.push_back(empty);
 
   ceph::unordered_map<inodeno_t, int> 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