That's a style choice that I made. The compiler is going to do the same anyway. I'd rather stick the error check to the operation and return 0 at the end then rely on the function to return the error at the end. It makes future changes less error prone.