mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 01:08:54 +00:00
Simplify string comparison
Found via newer cppcheck.
This commit is contained in:
parent
99ec09f13a
commit
058706014b
@ -3932,7 +3932,7 @@ static int parse_passwd_file(bucketkvmap_t& resmap)
|
|||||||
S3FS_PRN_EXIT("invalid line in passwd file, found whitespace character.");
|
S3FS_PRN_EXIT("invalid line in passwd file, found whitespace character.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(0 == line.find_first_of('[')){
|
if('[' == line[0]){
|
||||||
S3FS_PRN_EXIT("invalid line in passwd file, found a bracket \"[\" character.");
|
S3FS_PRN_EXIT("invalid line in passwd file, found a bracket \"[\" character.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user