When reviewing, I sometimes encounter this kind of loop:
i = begin while ( i != end ) { // ... do stuff if ( i == end-1 (the one-but-last element)
Another thing I hate to see is the for-case pattern:
for (i=0; i<5; i++) { switch(i) { case 0: // something break; case 1: // something else break; // etc... } }
I've seen this in real code.