Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura Henning committed Sep 20, 2024
1 parent cd8145b commit 2a40179
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion internal/context/gnb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"fmt"
"net"

"github.com/google/uuid"

"github.com/free5gc/pfcp/pfcpType"
"github.com/free5gc/smf/internal/logger"
"github.com/google/uuid"
)

// embeds the UPNode struct ("inheritance")
Expand Down
8 changes: 4 additions & 4 deletions internal/context/user_plane_information.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func NewUserPlaneInformation(upTopology *factory.UserPlaneInformation) *UserPlan
staticUeIPPools = append(staticUeIPPools, staticUeIPPool)
for _, dynamicUePool := range ueIPPools {
if dynamicUePool.ueSubNet.Contains(staticUeIPPool.ueSubNet.IP) {
if err := dynamicUePool.Exclude(staticUeIPPool); err != nil {
if err = dynamicUePool.Exclude(staticUeIPPool); err != nil {
logger.InitLog.Fatalf("exclude static Pool[%s] failed: %v",
staticUeIPPool.ueSubNet, err)
}
Expand All @@ -228,10 +228,10 @@ func NewUserPlaneInformation(upTopology *factory.UserPlaneInformation) *UserPlan
}
for _, pool := range ueIPPools {
if pool.pool.Min() != pool.pool.Max() {
if err := pool.pool.Reserve(pool.pool.Min(), pool.pool.Min()); err != nil {
if err = pool.pool.Reserve(pool.pool.Min(), pool.pool.Min()); err != nil {
logger.InitLog.Errorf("Remove network address failed for %s: %s", pool.ueSubNet.String(), err)
}
if err := pool.pool.Reserve(pool.pool.Max(), pool.pool.Max()); err != nil {
if err = pool.pool.Reserve(pool.pool.Max(), pool.pool.Max()); err != nil {
logger.InitLog.Errorf("Remove network address failed for %s: %s", pool.ueSubNet.String(), err)
}
}
Expand Down Expand Up @@ -463,7 +463,7 @@ func (upi *UserPlaneInformation) UpNodesFromConfiguration(upTopology *factory.Us
staticUeIPPools = append(staticUeIPPools, ueIPPool)
for _, dynamicUePool := range ueIPPools {
if dynamicUePool.ueSubNet.Contains(ueIPPool.ueSubNet.IP) {
if err := dynamicUePool.Exclude(ueIPPool); err != nil {
if err = dynamicUePool.Exclude(ueIPPool); err != nil {
logger.InitLog.Fatalf("exclude static Pool[%s] failed: %v",
ueIPPool.ueSubNet, err)
}
Expand Down

0 comments on commit 2a40179

Please sign in to comment.