Skip to content

Commit

Permalink
Get rid of silly unused parameter
Browse files Browse the repository at this point in the history
Apparently we were passing a string to the function so it could do:
rs = rs;

Signed-off-by: Colin McCabe <[email protected]>
  • Loading branch information
cmccabe committed Sep 13, 2011
1 parent 8e141f4 commit 9a0f55d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/tools/ceph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ int main(int argc, const char **argv)
}

bufferlist obl;
if (ceph_tool_do_command(ctx, cmd, indata, obl))
if (do_command(ctx, cmd, indata, obl))
ret = 1;
if (obl.length()) {
int err = obl.write_fd(out_fd);
Expand Down
13 changes: 2 additions & 11 deletions src/tools/common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ class Admin : public Dispatcher {
};

static int do_command(CephToolCtx *ctx,
vector<string>& cmd, bufferlist& bl, string& rs, bufferlist& rbl)
vector<string>& cmd, bufferlist& bl, bufferlist& rbl)
{
Mutex::Locker l(ctx->lock);

Expand All @@ -336,7 +336,6 @@ static int do_command(CephToolCtx *ctx,
while (!reply)
cmd_cond.Wait(ctx->lock);

rs = rs;
rbl = reply_bl;
if (!ctx->concise)
*ctx->log << ceph_clock_now(g_ceph_context) << " "
Expand Down Expand Up @@ -461,8 +460,7 @@ int run_command(CephToolCtx *ctx, const char *line)
}

in.clear();
string rs;
do_command(ctx, cmd, out, rs, in);
do_command(ctx, cmd, out, in);

if (in.length() == 0)
return 0;
Expand Down Expand Up @@ -490,13 +488,6 @@ int run_command(CephToolCtx *ctx, const char *line)
return 0;
}

int ceph_tool_do_command(CephToolCtx *ctx, std::vector<std::string>& cmd,
bufferlist& indata, bufferlist& outdata)
{
string rs;
return do_command(ctx, cmd, indata, rs, outdata);
}

CephToolCtx* ceph_tool_common_init(ceph_tool_mode_t mode, bool concise)
{
ceph_tool_mode = mode;
Expand Down

0 comments on commit 9a0f55d

Please sign in to comment.