As you see, axis2_bool_t, has two values, AXIS2_TRUE and AXIS2_FALSE that
corresponds to true and false respectively.
Now when such a type is compared in an 'if' or a 'while' as in,
if (..statement..) or while (..statement..) there are two mechanisms used.

That is,
lets assume myVar = AXIS2_TRUE;

Now, we have used,
1. if (myVar) { }
2. if (AXIS2_TRUE == myVar) { }

Therefore, it is kind of confusing at times.

As, AXIS2_TRUE is being defined as 1, and AXIS2_FALSE is being defined as
0, things would work alright (refer axutil_utils_defines.h).

But, however, it is better to stick to option 2, as  axis2_bool_t is
derived from int, and thus can have more than 2 values in theory (Ex:- if
someone sets myVar = 3). If we opt to use option 1, it could potentially
lead to an erroneous state recognized as true, which is apparently not
what we expect.

I believe this issue needs some attention.

Senaka.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to