Skip to content

Commit

Permalink
fix: fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
a3828162 committed Apr 17, 2024
1 parent 5bd5249 commit 251c724
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions internal/security/security.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ func NASEncode(ue *RanUeContext, msg *nas.Message, securityContextAvailable bool
) {
var sequenceNumber uint8
if ue == nil {
err = fmt.Errorf("amfUe is nil")
fmt.Errorf("amfUe is nil")

Check failure on line 29 in internal/security/security.go

View workflow job for this annotation

GitHub Actions / lint (1.21)

unusedresult: result of fmt.Errorf call not used (govet)
return nil, nil
}
if msg == nil {
err = fmt.Errorf("Nas Message is empty")
fmt.Errorf("Nas Message is empty")

Check failure on line 33 in internal/security/security.go

View workflow job for this annotation

GitHub Actions / lint (1.21)

unusedresult: result of fmt.Errorf call not used (govet)
return nil, nil
}

Expand Down Expand Up @@ -87,11 +87,11 @@ func NASEnvelopeEncode(ue *RanUeContext, msg *nas.Message, securityContextAvaila
) {
var sequenceNumber uint8
if ue == nil {
err = fmt.Errorf("amfUe is nil")
fmt.Errorf("amfUe is nil")

Check failure on line 90 in internal/security/security.go

View workflow job for this annotation

GitHub Actions / lint (1.21)

unusedresult: result of fmt.Errorf call not used (govet)
return nil, nil
}
if msg == nil {
err = fmt.Errorf("Nas Message is empty")
fmt.Errorf("Nas Message is empty")
return nil, nil
}

Expand Down Expand Up @@ -173,7 +173,7 @@ func NASDecode(ue *RanUeContext, securityHeaderType uint8, payload []byte) (msg
}

err = msg.PlainNasDecode(&payload)

Check failure on line 175 in internal/security/security.go

View workflow job for this annotation

GitHub Actions / lint (1.21)

ineffectual assignment to err (ineffassign)
return
return nil, nil
} else { // Security protected NAS message
securityHeader := payload[0:6]
sequenceNumber := payload[6]
Expand Down
1 change: 0 additions & 1 deletion pkg/ike/handler/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
)

func SendIKESAINIT() {

ikeLog.Tracef("start IKE_SA_INIT message")

n3ueContext := context.N3UESelf()
Expand Down

0 comments on commit 251c724

Please sign in to comment.