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 committed by Vincent Demeester
parent 51c5706326
commit 292e38a144
1 changed files with 2 additions and 2 deletions

View File

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