Skip to content

Commit

Permalink
test/test_rgw_admin*: don't compare unsigend to less than 0
Browse files Browse the repository at this point in the history
Make checks simpler, use empty() instead of 'length() <= 0'.

Signed-off-by: Danny Al-Gaaf <[email protected]>
  • Loading branch information
dalgaaf committed Apr 26, 2018
1 parent 1fee727 commit d9486a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/test/test_rgw_admin_meta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions src/test/test_rgw_admin_opstate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d9486a3

Please sign in to comment.