From: Danny Al-Gaaf Date: Fri, 17 May 2013 12:15:23 +0000 (+0200) Subject: src/rbd.cc: silence CID COPY_PASTE_ERROR warning X-Git-Tag: v0.64~73^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd818a20c3fb6dd1b7485d07ced57f148c71fb77;p=ceph.git src/rbd.cc: silence CID COPY_PASTE_ERROR warning CID 1021212 (#1 of 1): Copy-paste error (COPY_PASTE_ERROR) copy_paste_error: "r" in "r = -*__errno_location()" looks like a copy-paste error. Should it say "fd" instead? Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rbd.cc b/src/rbd.cc index 17ccd061dc1c..c9b2f0a272ca 100644 --- a/src/rbd.cc +++ b/src/rbd.cc @@ -1296,16 +1296,13 @@ static int do_import(librbd::RBD &rbd, librados::IoCtx& io_ctx, fd = 0; size = 1ULL << *order; } else { - fd = open(path, O_RDONLY); - - if (fd < 0) { + if ((fd = open(path, O_RDONLY)) < 0) { r = -errno; cerr << "rbd: error opening " << path << std::endl; goto done2; } - r = fstat(fd, &stat_buf); - if (r < 0) { + if ((fstat(fd, &stat_buf)) < 0) { r = -errno; cerr << "rbd: stat error " << path << std::endl; goto done;