Remove duplicate call to net.ParseIP

and a little cleanup

Signed-off-by: Doug Davis <dug@us.ibm.com>
(cherry picked from commit b180de55ca)
This commit is contained in:
Doug Davis
2015-06-11 12:53:36 -07:00
committed by Jessica Frazelle
parent 2ef2967570
commit a1f16a3738
+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()
}