[vlc-devel] [PATCH 3/3] poll: report ENOMEM when malloc fails
Steve Lhomme
robux4 at gmail.com
Fri Nov 27 12:25:03 CET 2015
On Fri, Nov 27, 2015 at 11:54 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 2015-11-26 19:57, Steve Lhomme a écrit :
>>
>> similar to a few lines further
>
>
> This patch makes obviously no sense.
Who wrote this line ?
http://git.videolan.org/?p=vlc.git;a=blob;f=compat/poll.c;h=fa94c932ccfa57eda8a37874de60712c1b305718;hb=HEAD#l163
>
>> ---
>> compat/poll.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/compat/poll.c b/compat/poll.c
>> index 15e98a6..c2984cd 100644
>> --- a/compat/poll.c
>> +++ b/compat/poll.c
>> @@ -125,7 +125,10 @@ int poll(struct pollfd *fds, unsigned nfds, int
>> timeout)
>>
>> WSAEVENT *evts = malloc(nfds * sizeof (WSAEVENT));
>> if (evts == NULL)
>> + {
>> + errno = ENOMEM;
>> return -1; /* ENOMEM */
>> + }
>>
>> DWORD ret = WSA_WAIT_FAILED;
>> for (unsigned i = 0; i < nfds; i++)
>
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list