From 01fe317d02c684cbf4c439865895641ce0bb7d02 Mon Sep 17 00:00:00 2001 From: amitkuma Date: Mon, 31 Jul 2017 17:58:32 +0530 Subject: [PATCH] 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 --- src/tools/rbd/action/MergeDiff.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rbd/action/MergeDiff.cc b/src/tools/rbd/action/MergeDiff.cc index 6dfca77a32b..8d586e756f2 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); -- 2.39.5