fix some coverity bugs
Merge branch 'master' of http://github.com/Unidata/netcdf-c