Simplify string comparison

Found via newer cppcheck.
This commit is contained in:
Andrew Gaul 2019-03-14 22:19:33 +09:00
parent 99ec09f13a
commit 058706014b

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."); 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;
} }