The conceptual difficulty here probably is that this if statement does the actual work that needs to be done (the allocation of the memory block) during the evaluation of its condtion. The actual body of the if instruction is only executed when that fails and is of secondary importance.