CodeSOD: Exceptional Assignment

Ellen sends us a very simple WTF today, that she found in production code.

bool condition;

    condition = true;
    condition = false;

It's true, there isn't much to say about this exceptional code block. But if assigning a boolean to a boolean variable ever fails, we're prepared to handle it.

[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!

This post originally appeared on The Daily WTF.

Leave a Reply

Your email address will not be published. Required fields are marked *