Putting overflow code inside an atomic block, and style improvement (using predefined constant instead of raw number)