Core/SA: Fix some issues as analyzed by coverity and iron code style out...

... a bit.