Skip to content

Commit

Permalink
Merge pull request ceph#39667 from tchaikov/wip-tools-rados-optional
Browse files Browse the repository at this point in the history
tools/rados: assign to optional<> without deref'ing it

Reviewed-by: Radoslaw Zarzynski <[email protected]>
  • Loading branch information
tchaikov authored Feb 24, 2021
2 parents 9c48327 + 41d6859 commit 1a4b77a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tools/rados/rados.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2723,7 +2723,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,
}
string attr_name(nargs[obj_name ? 1 : 2]);
if (!obj_name) {
*obj_name = nargs[1];
obj_name = nargs[1];
}
bufferlist bl;
ret = detail::getxattr(io_ctx, *obj_name, attr_name, bl, use_striper);
Expand All @@ -2744,7 +2744,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts,

string attr_name(nargs[obj_name ? 1 : 2]);
if (!obj_name) {
*obj_name = nargs[1];
obj_name = nargs[1];
}
ret = detail::rmxattr(io_ctx, *obj_name, attr_name, use_striper);

Expand Down

0 comments on commit 1a4b77a

Please sign in to comment.