]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: 1351525 Argument cannot be negative 16686/head
authoramitkuma <amitkuma@redhat.com>
Mon, 31 Jul 2017 12:28:32 +0000 (17:58 +0530)
committeramitkuma <amitkuma@redhat.com>
Mon, 31 Jul 2017 12:28:32 +0000 (17:58 +0530)
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
src/tools/rbd/action/MergeDiff.cc

index 6dfca77a32bdbda34665a9b349ba0f65d990fdd0..8d586e756f24e97d56095190dd68d347ca8e3b7e 100644 (file)
@@ -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);