As a general guideline I ended up for myself, I like designing the code in a way that every function has only one exit point. I see this practice as something similar to "try avoiding goto, continue and break"; in general I think that the flow of execution should be as linear as possible to allow for easier reading. I've to say that my choice of variable names is not really happy in this case though!