[c] update comment
[c] mixing switch-case and if-else