Replace switch by if-else chunk
Replace switch by if-else chunk

A switch inside another switch makes the code hard to read.
I have replaced it by if-else and I have fixed the indentation.

OpenSCAP/openscap,OpenSCAP/openscap,OpenSCAP/openscap,OpenSCAP/openscap,OpenSCAP/openscap,OpenSCAP/openscap