[ofa-general] Re: [PATCH][TRIVIAL] ibsim: Some cosmetic changes

Sasha Khapyorsky sashak at voltaire.com
Tue Mar 10 08:18:32 PDT 2009


On 09:56 Tue 10 Mar     , Hal Rosenstock wrote:
> >
> > This is not equivalent.
> 
> Why not ?

In the original code:

	if (cond1) {
		if (cond2)
			do1();
	} else
		do2();

do2() will work *only* when cond1 is false. After your modification:

	if (cond1 && cond2)
		do1();
	else
		do2();

do2() will work when cond1 *or* cond2 are false.

Sasha



More information about the general mailing list