From 3f937afd75c758d7396a3f516ae77231a6f5b3d2 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 11 May 2014 17:07:44 +0200 Subject: [PATCH] Fix a bug that could prevent tinc from starting correctly on Windows. --- src/mingw/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mingw/device.c b/src/mingw/device.c index 441c5247..235e0fd6 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -1,7 +1,7 @@ /* device.c -- Interaction with Windows tap driver in a MinGW environment Copyright (C) 2002-2005 Ivo Timmermans, - 2002-2013 Guus Sliepen + 2002-2014 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ static DWORD WINAPI tapreader(void *bla) { DWORD len; OVERLAPPED overlapped; vpn_packet_t packet; - int errors; + int errors = 0; logger(LOG_DEBUG, "Tap reader running"); @@ -91,6 +91,8 @@ static DWORD WINAPI tapreader(void *bla) { route(myself, &packet); LeaveCriticalSection(&mutex); } + + return 0; } static bool setup_device(void) { -- 2.20.1