Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: basesrc



On Wed, Mar 01, 2000 at 08:28:42PM +0100, Michael Eriksson wrote:
> > Modified Files:
> >     basesrc/usr.bin/make: make.c
> > 
> > Log Message:
> > Fixed the oodate test to include the check of gn->cmtime == 0 without
> > breaking the original intent.
> 
> The new test,
> 
>         oodate = (gn->cmtime == 0 || Arch_LibOODate (gn) ||
>                  (gn->cmtime == 0 && (gn->type & OP_DOUBLEDEP)));
> 
> looks like a complicated way of writing
> 
>         oodate = (gn->cmtime == 0 || Arch_LibOODate (gn));

Indeed it is; that's an application of the associativity of || and a logical
law called absorption. (x || (x && y)) == x.

-- 
Bill Squier (groo%cs.stevens-tech.edu@localhost)
http://www.cs.stevens-tech.edu/~groo
Ph: (201)216-5486   Fax: (201)216-8249



Home | Main Index | Thread Index | Old Index