Updated nvdims to return -1 in appropriate instances, on appropriate platforms. (see notes for previous commit.)

This commit is contained in:
Ward Fisher 2012-06-12 18:52:50 +00:00
parent aa33c3c85c
commit 43b5dcccb9

View File

@ -37,6 +37,8 @@ int ncerr = NC_NOERR ;
* We do have to copy the arguments to switch from 'long'
* to 'size_t' or 'ptrdiff_t'. In my tests on an SGI,
* any additional cost was lost in measurement variation.
*
* This stanza is true on Windows with MinGW-64
*/
# include "onstack.h"
@ -44,7 +46,7 @@ int ncerr = NC_NOERR ;
static size_t
nvdims(int ncid, int varid)
{
int ndims=1, status;
int ndims=-1, status;
if ((status = nc_inq_varndims(ncid, varid, &ndims)))
{