Fix "void function should not return void expression" warning.
authorEtienne Dechamps <etienne@edechamps.fr>
Sun, 7 Jan 2018 14:44:12 +0000 (14:44 +0000)
committerEtienne Dechamps <etienne@edechamps.fr>
Sun, 7 Jan 2018 14:44:12 +0000 (14:44 +0000)
src/net_packet.c
src/route.c

index 7bd619fe2e4f1abe8aba67f8b8821699a7019015..9c913cabff55c22a114138824354d2e2b328fa83 100644 (file)
@@ -139,7 +139,8 @@ static void send_udp_probe_reply(node_t *n, vpn_packet_t *packet, length_t len)
 static void udp_probe_h(node_t *n, vpn_packet_t *packet, length_t len) {
        if(!DATA(packet)[0]) {
                logger(DEBUG_TRAFFIC, LOG_INFO, "Got UDP probe request %d from %s (%s)", packet->len, n->name, n->hostname);
-               return send_udp_probe_reply(n, packet, len);
+               send_udp_probe_reply(n, packet, len);
+               return;
        }
 
        if(DATA(packet)[0] == 2) {
@@ -687,7 +688,8 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
        }
 
        if(n->status.sptps) {
-               return send_sptps_packet(n, origpkt);
+               send_sptps_packet(n, origpkt);
+               return;
        }
 
 #ifdef DISABLE_LEGACY
@@ -1354,7 +1356,8 @@ static void try_tx_sptps(node_t *n, bool mtu) {
                        return;
                }
 
-               return try_tx(via, mtu);
+               try_tx(via, mtu);
+               return;
        }
 
        /* Otherwise, try to establish UDP connectivity. */
index 92dc1cd0a6755a62cc067821c157a3516dff3d4a..a3e92020ce4bcc47c2aa10be772990b92cb73c61 100644 (file)
@@ -651,11 +651,13 @@ static void route_ipv4(node_t *source, vpn_packet_t *packet) {
        }
 
        if(!subnet->owner->status.reachable) {
-               return route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_UNREACH);
+               route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_UNREACH);
+               return;
        }
 
        if(forwarding_mode == FMODE_OFF && source != myself && subnet->owner != myself) {
-               return route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
+               route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
+               return;
        }
 
        if(decrement_ttl && source != myself && subnet->owner != myself)
@@ -675,7 +677,8 @@ static void route_ipv4(node_t *source, vpn_packet_t *packet) {
        }
 
        if(directonly && subnet->owner != via) {
-               return route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
+               route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
+               return;
        }
 
        if(via && packet->len > MAX(via->mtu, 590) && via != myself) {
@@ -742,11 +745,13 @@ static void route_ipv6(node_t *source, vpn_packet_t *packet) {
        }
 
        if(!subnet->owner->status.reachable) {
-               return route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOROUTE);
+               route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOROUTE);
+               return;
        }
 
        if(forwarding_mode == FMODE_OFF && source != myself && subnet->owner != myself) {
-               return route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
+               route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
+               return;
        }
 
        if(decrement_ttl && source != myself && subnet->owner != myself)
@@ -766,7 +771,8 @@ static void route_ipv6(node_t *source, vpn_packet_t *packet) {
        }
 
        if(directonly && subnet->owner != via) {
-               return route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
+               route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
+               return;
        }
 
        if(via && packet->len > MAX(via->mtu, 1294) && via != myself) {