p2pd: remove some dead code
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 23 Oct 2012 11:14:31 +0000 (13:14 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 23 Oct 2012 11:45:54 +0000 (13:45 +0200)
Coverity:
CID 739634 (#1 of 1): Dead default in switch (DEADCODE)
  Execution cannot reach this statement "default:".

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/p2pd/src/p2pd.c

index 7bf9f2b..73905a0 100644 (file)
@@ -913,7 +913,6 @@ AddUdpDestPort(const char *value,
       return -1;
     }
     break;
-  case AF_INET:
   default:
     res = inet_pton(AF_INET, destAddr, &addr4.sin_addr);
     if (!is_broadcast(addr4) && !is_multicast(addr4)) {
@@ -942,7 +941,6 @@ AddUdpDestPort(const char *value,
            sizeof(addr6.sin6_addr.s6_addr));
     break;
   default:
-  case AF_INET:
     new->address.v4.s_addr = addr4.sin_addr.s_addr;
     break;
   }