Merge pull request #982 from gaul/cppcheck/find-first-of

Simplify string comparison
This commit is contained in:
Takeshi Nakatani 2019-03-22 13:59:45 +09:00 committed by GitHub
commit 876662ff89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3932,7 +3932,7 @@ static int parse_passwd_file(bucketkvmap_t& resmap)
S3FS_PRN_EXIT("invalid line in passwd file, found whitespace character.");
return -1;
}
if(0 == line.find_first_of('[')){
if('[' == line[0]){
S3FS_PRN_EXIT("invalid line in passwd file, found a bracket \"[\" character.");
return -1;
}