cls_rgw_client.cc: reduce scope of local variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw_admin.cc: fix same expression on both sides of '||'

Remove twice listed checks, get checks in alphabetical order,
added comment above the checks to point out to keep it in
alphabetical order to avoid double checks.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_bucket.cc: remove unused local variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw_bucket.cc: don't return bool if return value is int

Fix minor style issue: if the function return value is an integer
don't return bool values.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_bucket.cc: return result of function calls

Return the result of rgw_(un)link_bucket()/ from
RGWBucketMetadataHandler::put() to signal errors correctly to
the function caller.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_rest.cc: fix malloc memory leak

Free with malloc allocated memory in error case before return.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_rados.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_op.cc: reduce scope of local 'ret' integer variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_rest_s3.cc: fix dereferencing after deallocation

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merge pull request #451 from dalgaaf/wip-da-SCA-cppcheck-6-v2

Fix some issues from SCA - v2 - against ceph:next

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>