This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: cygcheck exit status


----Original Message----
>From: Igor Pechtchanski
>Sent: 06 July 2005 15:02

> On Tue, 5 Jul 2005, Eric Blake wrote:
> 
>> Christopher Faylor <cgf-no-personal-reply-please <at> cygwin.com> writes:
>> 
>>> 
>>> On Tue, Jul 05, 2005 at 08:49:06PM +0000, Eric Blake wrote:
>>>> <at>  <at>  -1677,7 +1681,7  <at>  <at>  main (int argc, char **argv) 
>>>>        { if (i)
>>>>          puts ("");
>>>> -       cygcheck (argv[i]);
>>>> +       ok &= cygcheck (argv[i]);
>>> 
>>> Why are you anding the result here?  Why not just set ok = cygcheck
>>> (...)? 
>> 
>> Because it's in a for loop, and when the first file fails but second
>> succeeds, you still want the overall command to exit with failure.
> 
> That's the correct intent, but shouldn't it be &&= instead of &=,
> technically?
> 	Igor


  Nope, because then it wouldn't evaluate operand (== call the function)
after the first failure.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]