On 01/01/12 05:50, Jim Meyering wrote:

> IMHO, "_result" is an unnecessarily generic name, and decl-after-stmt
> is ok for grep proper (but not dfa.c), so how about this instead?
> 
>      bool stat_fail = (desc < 0
>                        ? stat (file, &stats->stat)
>                        : fstat (desc, &stats->stat));
>      if (stat_fail)
>        {
>          ...

It turns out that the variable wasn't used anywhere else (in a previous
version of the code it was, but I missed this while refactoring)
and so I simplified it further to:

  if (desc < 0                                                                  
      ? stat (file, &stats->stat) != 0                                          
      : fstat (desc, &stats->stat) != 0)                                        

I made the other changes you suggested, and pushed it.

Reply via email to