1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #4 from aboch/sa

Fix minor static analysis issue in setup_ipv4.go
This commit is contained in:
Arnaud Porterie 2015-03-04 11:16:01 -08:00
commit 72b9738b1d

View file

@ -87,7 +87,7 @@ func checkNameserverOverlaps(nameservers []string, toCheck *net.IPNet) error {
return err return err
} }
if networkOverlaps(toCheck, nsNetwork) { if networkOverlaps(toCheck, nsNetwork) {
return fmt.Errorf("Requested network %s overlaps with name server") return fmt.Errorf("Requested network %s overlaps with name server", toCheck.String())
} }
} }
return nil return nil
@ -102,7 +102,7 @@ func checkRouteOverlaps(toCheck *net.IPNet) error {
for _, network := range networks { for _, network := range networks {
// TODO Is that right? // TODO Is that right?
if network.Dst != nil && networkOverlaps(toCheck, network.Dst) { if network.Dst != nil && networkOverlaps(toCheck, network.Dst) {
return fmt.Errorf("Requested network %s overlaps with an existing network") return fmt.Errorf("Requested network %s overlaps with an existing network", toCheck.String())
} }
} }
return nil return nil