Merge pull request #52472 from vedanshbhartia/coverity_1510724

rgw: Remove unnecessary null check from valid_s3_bucket_name

reviwed-by: soumyakoduri , yuvalif
This commit is contained in:
Yuval Lifshitz 2023-10-09 17:56:40 +03:00 committed by GitHub
commit 4bf3b6b3ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -882,7 +882,7 @@ inline int valid_s3_bucket_name(const std::string& name, bool relaxed=false)
continue;
if (c == '.') {
if (!relaxed && s && *s) {
if (!relaxed) {
// name cannot have consecutive periods or dashes
// adjacent to periods
// ensure s is neither the first nor the last character