Skip to content

Commit

Permalink
remove unneeded default case in switch
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Mar 30, 2021
1 parent 9547d0a commit 7c39c5c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/private.go
Expand Up @@ -72,8 +72,6 @@ func IsPublicAddr(a ma.Multiaddr) bool {
switch c.Protocol().Code {
case ma.P_IP6ZONE:
return true
default:
return false
case ma.P_IP4:
ip := net.IP(c.RawValue())
isPublic = !inAddrRange(ip, Private4) && !inAddrRange(ip, Unroutable4)
Expand All @@ -93,8 +91,6 @@ func IsPrivateAddr(a ma.Multiaddr) bool {
switch c.Protocol().Code {
case ma.P_IP6ZONE:
return true
default:
return false
case ma.P_IP4:
isPrivate = inAddrRange(net.IP(c.RawValue()), Private4)
case ma.P_IP6:
Expand Down

0 comments on commit 7c39c5c

Please sign in to comment.