Fix a few coverity warnings.
Merge branch 'master' of https://github.com/Unidata/netcdf-c