Don't chain more than on if-statement if not needed but use if-elseif construct

Open-webOS-DCO-1.0-Signed-off-by: Simon Busch <morphis@gravedo.de>