Yeah, in general the scoping of that snippet could result in different pieces of code on different compilers

Looks like it's been converted directly from C code