CCoding Style - Use the natural form for Expressions
Use the natural form for Expressions
- Write expressions as you might speak them aloud
if( !(block_id < actblks) || !(block_id >= unblocks) )
- Each test is stated negatively, though there is no need for either to be. Turning the relations around lets us state the tests positively.
If( (block_id >= actblks) || (block_id < unblocks) )
- Now the code reads naturally.