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

Remove duplicate call to net.ParseIP

and a little cleanup

Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
Doug Davis 2015-06-05 09:44:10 -07:00
parent 159f5e0137
commit b180de55ca

View file

@ -22,10 +22,10 @@ func (o *IpOpt) Set(val string) error {
if ip == nil {
return fmt.Errorf("%s is not an ip address", val)
}
(*o.IP) = net.ParseIP(val)
*o.IP = ip
return nil
}
func (o *IpOpt) String() string {
return (*o.IP).String()
return o.IP.String()
}