crypto/tls,regexp: remove always-nil error results

These were harmless, but added unnecessary verbosity to the code.
This can happen as a result of refactors: for example,
the method sessionState used to return errors in some cases.

Change-Id: I4e6dacc01ae6a49b528c672979f95cbb86795a85
Reviewed-on: https://go-review.googlesource.com/c/go/+/528995
Reviewed-by: Leo Isla <islaleo93@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Olivier Mengué <olivier.mengue@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
This commit is contained in:
Daniel Martí 2023-09-17 21:46:35 +01:00
parent 0cb1694084
commit 8d53a491d1
5 changed files with 9 additions and 21 deletions

View file

@ -915,10 +915,7 @@ func (hs *clientHandshakeState) saveSessionTicket() error {
return nil
}
session, err := c.sessionState()
if err != nil {
return err
}
session := c.sessionState()
session.secret = hs.masterSecret
cs := &ClientSessionState{ticket: hs.ticket, session: session}