summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv4')
-rw-r--r--dhcpv4/client4/client.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/dhcpv4/client4/client.go b/dhcpv4/client4/client.go
index f274714..253bf28 100644
--- a/dhcpv4/client4/client.go
+++ b/dhcpv4/client4/client.go
@@ -7,7 +7,6 @@ import (
"fmt"
"log"
"net"
- "reflect"
"time"
"github.com/insomniacslk/dhcp/dhcpv4"
@@ -145,10 +144,10 @@ func toUDPAddr(addr net.Addr, defaultAddr *net.UDPAddr) (*net.UDPAddr, error) {
if addr == nil {
uaddr = defaultAddr
} else {
- if addr, ok := addr.(*net.UDPAddr); ok {
- uaddr = addr
+ if a, ok := addr.(*net.UDPAddr); ok {
+ uaddr = a
} else {
- return nil, fmt.Errorf("could not convert to net.UDPAddr, got %v instead", reflect.TypeOf(addr))
+ return nil, fmt.Errorf("could not convert to net.UDPAddr, got %T instead", addr)
}
}
if uaddr.IP.To4() == nil {