Browse code

Remove duplicate call to net.ParseIP and a little cleanup

Signed-off-by: Doug Davis <dug@us.ibm.com>
(cherry picked from commit b180de55caa382fd6ced4488d68392edd1d34da0)

Doug Davis authored on 2015/06/06 01:44:10
Showing 1 changed files
... ...
@@ -22,10 +22,10 @@ func (o *IpOpt) Set(val string) error {
22 22
 	if ip == nil {
23 23
 		return fmt.Errorf("%s is not an ip address", val)
24 24
 	}
25
-	(*o.IP) = net.ParseIP(val)
25
+	*o.IP = ip
26 26
 	return nil
27 27
 }
28 28
 
29 29
 func (o *IpOpt) String() string {
30
-	return (*o.IP).String()
30
+	return o.IP.String()
31 31
 }