remove unneccesary if-else
This commit is contained in:
parent
37809a05b4
commit
a1fde55d8d
@ -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) {
|
func (fsd *fsData) reset_incorrect_pin(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||||
res := resource.Result{}
|
res := resource.Result{}
|
||||||
isIncorrectPinSet := fsd.st.MatchFlag(USERFLAG_INCORRECTPIN, true)
|
res.FlagReset = append(res.FlagReset, USERFLAG_INCORRECTPIN)
|
||||||
if isIncorrectPinSet {
|
|
||||||
res.FlagReset = append(res.FlagReset, USERFLAG_INCORRECTPIN)
|
|
||||||
} else {
|
|
||||||
res.FlagReset = append(res.FlagReset, USERFLAG_INCORRECTPIN)
|
|
||||||
}
|
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user