You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Yann Ylavic <yl...@gmail.com> on 2018/08/24 23:39:40 UTC

Re: svn commit: r1838963 - /apr/apr/branches/1.6.x/poll/unix/port.c

On Fri, Aug 24, 2018 at 11:13 PM <ni...@apache.org> wrote:
>
> -    if ((*num = j)) { /* any event besides wakeup pipe? */
> +    if (nres > 0) { /* any event besides wakeup pipe? */
> +        *num = nres;
>          rv = APR_SUCCESS;

Shouldn't we set *num = 0 still?

Btw, this commit probably needs to go to trunk too.

Regards,
Yann.

Re: svn commit: r1838963 - /apr/apr/branches/1.6.x/poll/unix/port.c

Posted by Rainer Jung <ra...@kippdata.de>.
Am 25.08.2018 um 02:20 schrieb Nick Kew:
> 
>> On 25 Aug 2018, at 00:39, Yann Ylavic <yl...@gmail.com> wrote:
>>
>> On Fri, Aug 24, 2018 at 11:13 PM <ni...@apache.org> wrote:
>>>
>>> -    if ((*num = j)) { /* any event besides wakeup pipe? */
>>> +    if (nres > 0) { /* any event besides wakeup pipe? */
>>> +        *num = nres;
>>>          rv = APR_SUCCESS;
>>
>> Shouldn't we set *num = 0 still?
> 
> It already is (at the top).  But yes, that could be further rationalised.
> 
> I basically fixed what caused me to take twice as long as it should
> have done to review it (though obviously the ugliness was older
> than your fix I was reviewing).
> 
>> Btw, this commit probably needs to go to trunk too.
> 
> Agreed.  And 1.7.  Will do - unless you get there first.

Did this (apply to trunk+1.7) happen?

Regards,

Rainer

Re: svn commit: r1838963 - /apr/apr/branches/1.6.x/poll/unix/port.c

Posted by Nick Kew <ni...@apache.org>.
> On 25 Aug 2018, at 00:39, Yann Ylavic <yl...@gmail.com> wrote:
> 
> On Fri, Aug 24, 2018 at 11:13 PM <ni...@apache.org> wrote:
>> 
>> -    if ((*num = j)) { /* any event besides wakeup pipe? */
>> +    if (nres > 0) { /* any event besides wakeup pipe? */
>> +        *num = nres;
>>         rv = APR_SUCCESS;
> 
> Shouldn't we set *num = 0 still?

It already is (at the top).  But yes, that could be further rationalised.

I basically fixed what caused me to take twice as long as it should
have done to review it (though obviously the ugliness was older
than your fix I was reviewing).

> Btw, this commit probably needs to go to trunk too.

Agreed.  And 1.7.  Will do - unless you get there first.

-- 
Nick Kew

Re: svn commit: r1838963 - /apr/apr/branches/1.6.x/poll/unix/port.c

Posted by Yann Ylavic <yl...@gmail.com>.
On Sat, Aug 25, 2018 at 1:39 AM Yann Ylavic <yl...@gmail.com> wrote:
>
> On Fri, Aug 24, 2018 at 11:13 PM <ni...@apache.org> wrote:
> >
> > -    if ((*num = j)) { /* any event besides wakeup pipe? */
> > +    if (nres > 0) { /* any event besides wakeup pipe? */
> > +        *num = nres;
> >          rv = APR_SUCCESS;
>
> Shouldn't we set *num = 0 still?

Scratch that, done at the beginning of the function already.