From: Dan Mick Date: Thu, 24 Jan 2013 21:38:25 +0000 (-0800) Subject: rados: remove unused "check_stdio" parameter X-Git-Tag: v0.56.4~51 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff014ed26bfa4fbf40acffec4eb4805b95a9982c;p=ceph.git rados: remove unused "check_stdio" parameter Signed-off-by: Dan Mick (cherry picked from commit bb860e49a7faeaf552538a9492ef0ba738c99760) --- diff --git a/src/rados.cc b/src/rados.cc index 4bbfaed8650a..3a097feb20d2 100644 --- a/src/rados.cc +++ b/src/rados.cc @@ -174,7 +174,7 @@ static int do_get(IoCtx& io_ctx, const char *objname, const char *outfile, unsig string oid(objname); int fd; - if (check_stdio && strcmp(outfile, "-") == 0) { + if (strcmp(outfile, "-") == 0) { fd = 1; } else { fd = TEMP_FAILURE_RETRY(::open(outfile, O_WRONLY|O_CREAT|O_TRUNC, 0644)); @@ -202,7 +202,7 @@ static int do_get(IoCtx& io_ctx, const char *objname, const char *outfile, unsig offset += outdata.length(); } - if (!check_stdio) + if (fd != 1) TEMP_FAILURE_RETRY(::close(fd)); return 0; } @@ -339,7 +339,7 @@ static int do_put(IoCtx& io_ctx, const char *objname, const char *infile, int op string oid(objname); bufferlist indata; bool stdio = false; - if (check_stdio && strcmp(infile, "-") == 0) + if (strcmp(infile, "-") == 0) stdio = true; int ret;