@andrerom 
That's not so important, but it's true than when I read the code, I was unsure about the logic, hence my question. Maybe a bit more readable with my suggestion, but maybe that's just a matter of taste.
Feel free to use it or not.