mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 01:08:54 +00:00
Prefer string::find_first_of(char) where possible
This commit is contained in:
parent
757f4caee8
commit
eb8004c355
@ -2355,7 +2355,7 @@ int S3fsCurl::RequestPerform(bool dontAddAuthHeaders /*=false*/)
|
||||
case CURLE_PEER_FAILED_VERIFICATION:
|
||||
S3FS_PRN_ERR("### CURLE_PEER_FAILED_VERIFICATION");
|
||||
|
||||
first_pos = bucket.find_first_of(".");
|
||||
first_pos = bucket.find_first_of('.');
|
||||
if(first_pos != std::string::npos){
|
||||
S3FS_PRN_INFO("curl returned a CURL_PEER_FAILED_VERIFICATION error");
|
||||
S3FS_PRN_INFO("security issue found: buckets with periods in their name are incompatible with http");
|
||||
|
@ -3502,7 +3502,7 @@ static int parse_passwd_file(bucketkvmap_t& resmap)
|
||||
// read '=' type
|
||||
kvmap_t kv;
|
||||
for(iter = linelist.begin(); iter != linelist.end(); ++iter){
|
||||
first_pos = iter->find_first_of("=");
|
||||
first_pos = iter->find_first_of('=');
|
||||
if(first_pos == std::string::npos){
|
||||
continue;
|
||||
}
|
||||
@ -3523,8 +3523,8 @@ static int parse_passwd_file(bucketkvmap_t& resmap)
|
||||
|
||||
// read ':' type
|
||||
for(iter = linelist.begin(); iter != linelist.end(); ++iter){
|
||||
first_pos = iter->find_first_of(":");
|
||||
size_t last_pos = iter->find_last_of(":");
|
||||
first_pos = iter->find_first_of(':');
|
||||
size_t last_pos = iter->find_last_of(':');
|
||||
if(first_pos == std::string::npos){
|
||||
continue;
|
||||
}
|
||||
@ -4932,7 +4932,7 @@ int main(int argc, char* argv[])
|
||||
// See issue #128strncasecmp
|
||||
/*
|
||||
if(1 == S3fsCurl::GetSslVerifyHostname()){
|
||||
found = bucket.find_first_of(".");
|
||||
found = bucket.find_first_of('.');
|
||||
if(found != std::string::npos){
|
||||
found = s3host.find("https:");
|
||||
if(found != std::string::npos){
|
||||
|
Loading…
Reference in New Issue
Block a user