CheckBufferOverrun: Code cleanup