On Sat, Oct 18, 2014 at 8:51 AM, Luca Barbato <[email protected]> wrote:
>> @@ -254,7 +258,11 @@ int ff_listen_bind(int fd, const struct sockaddr
>> *addr,
>>
>>       closesocket(fd);
>>
>> -    ff_socket_nonblock(ret, 1);
>> +    res = ff_socket_nonblock(ret, 1);
>> +    if (res < 0) {
>> +        closesocket(ret);
>> +        return ff_neterrno();
>
> return res ?

res is probably going to be -1 in this case, errno contains a more
accurate error description I think.

>> @@ -266,7 +274,9 @@ int ff_listen_connect(int fd, const struct sockaddr
>> *addr,
>>       int ret;
>>       socklen_t optlen;
>>
>> -    ff_socket_nonblock(fd, 1);
>> +    ret = ff_socket_nonblock(fd, 1);
>> +    if (ret < 0)
>
>
> return ret?
> closesocket(fd) ?

fd is not created if that function fails, and ret is not as
informative as errno imho
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to