On 27/01/15 11:39, Joshua Rogers wrote:
> if(do_fstat(data, 1)<0) {
> return -1;
> }
This was wrong, anyways.

if '1' is returned, the it is OK to continue.
If '0' is returned, it is not OK to continue(return -1)


Since this is the case, should the do_fstat function be changed to a
boolean?

It is only possible for it to return 0 and 1:

>                d->cached_fstat = r == 0;
>
>                 return r;
>         }
>         return 0;


It makes it confusing when reading the code that it is defined as an
int, but the output can only be 0/1.

Does anybody object to me changing to from a 'static int', to a 'static
zend_bool'?

I'll submit a PR, but I would be interested in feedback via the mailing
list.


Thanks,

-- 
-- Joshua Rogers <https://internot.info/>

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to