Merge pull request #13767 from duglin/TweakInNetOpts

Remove duplicate call to net.ParseIP
Upstream-commit: 5c051e2e263955788809819c37a4a3b9142247ed
Component: engine
This commit is contained in:
Jessie Frazelle
2015-06-05 10:46:31 -07:00
+2 -2
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()
}