fix some findings by the static analyser

fixes: https://github.com/RIOT-OS/RIOT/issues/480