From 2632846e24e3c26139e982e0a569951d25e1589b Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 12 Aug 2013 10:05:44 -0700 Subject: [PATCH] rgw: fix multi delete Fixes: #5931 Backport: bobtail, cuttlefish Fix a bad check, where we compare the wrong field. Instead of comparing the ret code to 0, we compare the string value to 0 which generates implicit casting, hence the crash. Signed-off-by: Yehuda Sadeh Reviewed-by: Josh Durgin --- src/rgw/rgw_rest_s3.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index bbf363804bde8..8690dd8fdbebd 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -1709,7 +1709,7 @@ void RGWDeleteMultiObj_ObjStore_S3::send_partial_response(pair& resu s->formatter->open_object_section("Deleted"); s->formatter->dump_string("Key", result.first); s->formatter->close_section(); - } else if (result.first < 0) { + } else if (result.second < 0) { struct rgw_http_errors r; int err_no; -- 2.39.5