remove unneccesary if-else

This commit is contained in:
Carlosokumu 2024-08-25 22:13:41 +03:00
parent 37809a05b4
commit a1fde55d8d
Signed by: carlos
GPG Key ID: 7BD6BC8160A5C953

View File

@ -395,12 +395,7 @@ func (fsd *fsData) unlock(ctx context.Context, sym string, input []byte) (resour
func (fsd *fsData) reset_incorrect_pin(ctx context.Context, sym string, input []byte) (resource.Result, error) {
res := resource.Result{}
isIncorrectPinSet := fsd.st.MatchFlag(USERFLAG_INCORRECTPIN, true)
if isIncorrectPinSet {
res.FlagReset = append(res.FlagReset, USERFLAG_INCORRECTPIN)
} else {
res.FlagReset = append(res.FlagReset, USERFLAG_INCORRECTPIN)
}
return res, nil
}