From: amitkuma Date: Mon, 31 Jul 2017 12:28:32 +0000 (+0530) Subject: rbd: 1351525 Argument cannot be negative X-Git-Tag: v12.1.2~31^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F16686%2Fhead;p=ceph.git rbd: 1351525 Argument cannot be negative Fixed: ** CID 1351525 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS) 7. negative_returns: sd is passed to a parameter that cannot be negative. Signed-off-by: Amit Kumar amitkuma@redhat.com --- diff --git a/src/tools/rbd/action/MergeDiff.cc b/src/tools/rbd/action/MergeDiff.cc index 6dfca77a32bdb..8d586e756f24e 100644 --- a/src/tools/rbd/action/MergeDiff.cc +++ b/src/tools/rbd/action/MergeDiff.cc @@ -389,7 +389,7 @@ static int do_merge_diff(const char *first, const char *second, done: if (pd > 2) close(pd); - if (sd) + if (sd > 2) close(sd); if (fd > 2) close(fd);