summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2022-09-15 08:16:41 +0100
committerGitHub <noreply@github.com>2022-09-15 08:16:41 +0100
commit034ec2b821e6f661b6635d46f2f05931b284cc02 (patch)
treefd8e8b029c4d0fe417855b6f775abba2e6f6e42d
parentfd832634ab6cc4520842ded0b3f88d492e50595c (diff)
parent3194d6dcbf023c0bab49842c67de204ad416e7e9 (diff)
Merge branch 'master' into fix_label
-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 {