Skip to content

Commit 7c39c5c

Browse files
remove unneeded default case in switch
1 parent 9547d0a commit 7c39c5c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

net/private.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ func IsPublicAddr(a ma.Multiaddr) bool {
7272
switch c.Protocol().Code {
7373
case ma.P_IP6ZONE:
7474
return true
75-
default:
76-
return false
7775
case ma.P_IP4:
7876
ip := net.IP(c.RawValue())
7977
isPublic = !inAddrRange(ip, Private4) && !inAddrRange(ip, Unroutable4)
@@ -93,8 +91,6 @@ func IsPrivateAddr(a ma.Multiaddr) bool {
9391
switch c.Protocol().Code {
9492
case ma.P_IP6ZONE:
9593
return true
96-
default:
97-
return false
9894
case ma.P_IP4:
9995
isPrivate = inAddrRange(net.IP(c.RawValue()), Private4)
10096
case ma.P_IP6:

0 commit comments

Comments
 (0)