Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/ReplicatedPG: remove unneeded use of count #11251

Merged
merged 1 commit into from Nov 5, 2016

Conversation

stiopaa1
Copy link
Contributor

Signed-off-by: Michal Jarzabek stiopa@gmail.com

@@ -5936,7 +5937,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
for (map<string, pair<bufferlist, int> >::iterator i = assertions.begin();
i != assertions.end();
++i) {
bufferlist &bl = out.count(i->first) ?
auto out_entry = out.find(i->first);
bufferlist &bl = (out_entry != out.end()) ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we don't reuse out_entry, i think the use of count() here is correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liewegas
I forgotten to use it in the next line, I have pushed the corrected commit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see. Thanks!

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
@tchaikov
Copy link
Contributor

lgtm

@liewegas liewegas added this to the kraken milestone Nov 3, 2016
@tchaikov tchaikov merged commit 916d461 into ceph:master Nov 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants