From 6a51d89cf706bcefce1861a1a66d40ef7d7db43b Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 2 Jan 2011 16:55:42 +0100 Subject: [PATCH] Replace bogus #else with #endif. 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bsd/device.c b/src/bsd/device.c index e8fdc1bc..5a60ab77 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -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, -- 2.39.5