You can use the multiplication operator
while (&proc1 * &proc2 * &proc3) { ... }
This will evaluate all three operands and evaluate to false if any of them is false (zero).
If you are worried about warnings about uninitialized values, you can use bitwise - and with !! discarding to a boolean pseudo-operator:
while (!!&proc1 & !!&proc2 & !!&proc3) { ... }
which will do almost the same thing. Boolean casting is necessary because the result of bitwise and two arbitrary true values can still be false (for example, 1 & 2 evaluates to 0 ).
source share