[PATCH 2/2] dpwsockx: Implementation of Open callback

Vitaliy Margolen wine-devel at kievinfo.com
Sun Sep 13 17:46:37 CDT 2009


Ismael Barros² wrote:
> On Sun, Sep 13, 2009 at 11:46 PM, Vitaliy Margolen
> <wine-devel at 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.



More information about the wine-devel mailing list