This is part of the init code of a downloaded firmware of some stm32f030 microcontroller. It was disassembled using radare2. It is called after the clock has been initialized but before the heap is.
0x0800335c 00f00bf8 bl fcn.08003376
0x08003360 0028 cmp r0, 0
0x08003362 01d0 beq 0x8003368
0x08003364 fff7d4ff bl INIT2
0x08003368 0020 movs r0, 0
[...]
0x08003376 0120 movs r0, 1
0x08003378 7047 bx lr
As far as I can tell r0 gets always set to 1 so INIT2 is never skipped. I don't get the point. What am I missing?