Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
UltraInstinct14 authored Nov 5, 2023
2 parents 201f159 + 61ffaa4 commit 02a3a7c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions loxinet/zones.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,19 +187,14 @@ func (z *ZoneH) ZonePortIsValid(name string, zns string) (int, error) {

// GetPortZone - routine to identify the zone of a port
func (z *ZoneH) GetPortZone(port string) *Zone {
zone := z.ZonePorts[port]
if zone == nil {
return nil
}

return zone
return z.ZonePorts[port]
}

// ZonePortAdd - routine to add a port to a zone
func (z *ZoneH) ZonePortAdd(name string, zns string) (int, error) {
zone := z.ZonePorts[name]
if zone != nil {
if zone.Name == name {
if zone.Name == zns {
return 0, nil
}
return ZoneExistsErr, errors.New("zone exists")
Expand Down

0 comments on commit 02a3a7c

Please sign in to comment.