Skip to content

Commit

Permalink
style: fix naked return
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchennn committed Nov 24, 2023
1 parent 89bfa61 commit 0cdbfa6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions internal/context/user_plane_information.go
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ func getPathBetween(cur *UPNode, dest *UPNode, visited map[*UPNode]bool,
path = make([]*UPNode, 0)
path = append(path, cur)
pathExist = true
return
return path, pathExist
}

selectedSNssai := selection.SNssai
Expand All @@ -760,16 +760,14 @@ func getPathBetween(cur *UPNode, dest *UPNode, visited map[*UPNode]bool,
continue
}

path_tail, path_exist := getPathBetween(node, dest, visited, selection)
path_tail, pathExist := getPathBetween(node, dest, visited, selection)

if path_exist {
if pathExist {
path = make([]*UPNode, 0)
path = append(path, cur)

path = append(path, path_tail...)
pathExist = true

return
return path, pathExist
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/sbi/consumer/nnrf.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func SendNFDiscoveryPCF() (problemDetails *models.ProblemDetails, err error) {
logger.ConsumerLog.Warnln("handler returned wrong status code ", httpResp.Status)
if httpResp.Status != localErr.Error() {
err = localErr
return
return problemDetails, err
}
problem := localErr.(openapi.GenericOpenAPIError).Model().(models.ProblemDetails)
problemDetails = &problem
Expand Down

0 comments on commit 0cdbfa6

Please sign in to comment.