mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-06-03 09:30:51 +00:00
Merge pull request #982 from gaul/cppcheck/find-first-of
Simplify string comparison
This commit is contained in:
commit
876662ff89
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user