From: Danny Al-Gaaf Date: Thu, 26 Apr 2018 08:08:24 +0000 (+0200) Subject: test/test_rgw_admin*: don't compare unsigend to less than 0 X-Git-Tag: v13.1.0~44^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d9486a391a021f95f5cfc2287928ab8435aa4f3c;p=ceph.git test/test_rgw_admin*: don't compare unsigend to less than 0 Make checks simpler, use empty() instead of 'length() <= 0'. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/test/test_rgw_admin_meta.cc b/src/test/test_rgw_admin_meta.cc index 9695a3c6d0c9..c0ade77ab48f 100644 --- a/src/test/test_rgw_admin_meta.cc +++ b/src/test/test_rgw_admin_meta.cc @@ -132,8 +132,7 @@ int test_helper::extract_input(int argc, char *argv[]){ ERR_CHECK_NEXT_PARAM(rgw_admin_path); }else return -1; } - if(host.length() <= 0 || - rgw_admin_path.length() <= 0) + if(host.empty() || rgw_admin_path.empty()) return -1; return 0; } diff --git a/src/test/test_rgw_admin_opstate.cc b/src/test/test_rgw_admin_opstate.cc index 464bd85a86ab..b999bb68982d 100644 --- a/src/test/test_rgw_admin_opstate.cc +++ b/src/test/test_rgw_admin_opstate.cc @@ -135,8 +135,7 @@ int test_helper::extract_input(int argc, char *argv[]){ ERR_CHECK_NEXT_PARAM(rgw_admin_path); }else return -1; } - if(host.length() <= 0 || - rgw_admin_path.length() <= 0) + if(host.empty() || rgw_admin_path.empty()) return -1; return 0; }