Skip to content

Commit

Permalink
Merge pull request #430 from cybwan/fix-issue
Browse files Browse the repository at this point in the history
fix issues
  • Loading branch information
UltraInstinct14 authored Nov 5, 2023
2 parents 1d59d7d + 01a7846 commit 61ffaa4
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 61ffaa4

Please sign in to comment.