From a1fde55d8d0e07536a333abe47fbff208088d46f Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Sun, 25 Aug 2024 22:13:41 +0300 Subject: [PATCH] remove unneccesary if-else --- cmd/main.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 4169c58..63126f0 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -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) - } + res.FlagReset = append(res.FlagReset, USERFLAG_INCORRECTPIN) return res, nil }