question about return;

I assume it is a local variable and in that case you need to give it an initial value - otherwise it will use whatever happened to be in that memory location.

My understanding from comments in other threads was that both global and static local integer variables are initialised to zero by default but I have no definitive reference for that, and in any case doing it explicitly makes the intention obvious and is, I suggest, the preferred method.