Ismael Barros² wrote: > On Sun, Sep 13, 2009 at 11:46 PM, Vitaliy Margolen > <wine-de...@kievinfo.com> wrote: >> Forgot this part: >>> Ismael Barros wrote: >>> +static DWORD WINAPI tcp_listener_thread( LPVOID lpParameter ) >>> +{ >>> + for ( ;; ) >>> + { >>> + if ( clientSock == INVALID_SOCKET ) >>> + { >>> + goto end; >>> + } >>> + } >>> + >>> +end: >>> +} >> It's more cleaner to use "break;" instead of goto to exit the loop. > > It's a way to tell between abruptly ending the thread due to an error, > and ending the thread gracefully. That makes no sense to me. You have no other point of exit from the loop. Using goto for no good reason is always a bad thing.
Vitaliy.