[c] Switch statement with returns -- code correctness