correct a couple of scan-build identified issues - an uninitialised vari...

...able, and some redundant code