[1/4] ws2_32: Use the struct information when the parameters are zero in WSASocket

Bruno Jesus 00cpxxx at gmail.com
Tue Sep 17 08:06:03 CDT 2013


On Tue, Sep 17, 2013 at 7:00 AM, Alexandre Julliard <julliard at winehq.org> wrote:
> Bruno Jesus <00cpxxx at gmail.com> writes:
>
>> @@ -5884,20 +5884,20 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
>>        return ret;
>>      }
>>
>> -    /* convert the socket family and type */
>> -    af = convert_af_w2u(af);
>> -    type = convert_socktype_w2u(type);
>> -
>>      if (lpProtocolInfo)
>>      {
>> -        if (af == FROM_PROTOCOL_INFO)
>> +        if (af <= 0)
>>              af = lpProtocolInfo->iAddressFamily;
>> -        if (type == FROM_PROTOCOL_INFO)
>> +        if (type <= 0)
>>              type = lpProtocolInfo->iSocketType;
>> -        if (protocol == FROM_PROTOCOL_INFO)
>> +        if (protocol <= 0)
>>              protocol = lpProtocolInfo->iProtocol;
>
> I don't see anything in the tests that would justify checking for
> negative values here.

You're right, sorry. New version sent.

> --
> Alexandre Julliard
> julliard at winehq.org

Reagrds,
Bruno



More information about the wine-devel mailing list