Replace chain of ifs with switch

Sometimes if statements are chained and form a series of == comparisons
against constants. Such situation is more readable if written using
switch statement.

Change-Id: I699710eb77cb7b84e34d32ec1460daab696c8591
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
6 files changed