]> git.meshlink.io Git - meshlink/commitdiff
Replace bogus #else with #endif.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 2 Jan 2011 15:55:42 +0000 (16:55 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 2 Jan 2011 15:55:42 +0000 (16:55 +0100)
Found by cppcheck, which complained about lenin not being initialized, but the
real problem is that reading packets would fail when using code compiled with
--tunemu on a normal tun device.

src/bsd/device.c

index e8fdc1bc3abc94b603f022f8382c415d39babb96..5a60ab776019d21e01fc6e4295a812a37e49ef3c 100644 (file)
@@ -199,9 +199,8 @@ bool read_packet(vpn_packet_t *packet) {
                        if(device_type == DEVICE_TYPE_TUNEMU)
                                lenin = tunemu_read(device_fd, packet->data + 14, MTU - 14);
                        else
-#else
-                               lenin = read(device_fd, packet->data + 14, MTU - 14);
 #endif
+                               lenin = read(device_fd, packet->data + 14, MTU - 14);
 
                        if(lenin <= 0) {
                                logger(LOG_ERR, "Error while reading from %s %s: %s", device_info,