Commit 7c39c5cf authored by Marten Seemann's avatar Marten Seemann

remove unneeded default case in switch

parent 9547d0a0
......@@ -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)
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment