mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
Fix compliance with classic model
h5->nvars is unused; the variable count is maintainted in grp->nvars An alternate fix may be to maintain a global var count (sum of all groups) in h5->nvars. Since h5->nvars does not seem to be used, possibly remove from the struct.
This commit is contained in:
parent
eb9e76ae69
commit
513e10d057
@ -391,8 +391,8 @@ nc_def_var_nc4(int ncid, const char *name, nc_type xtype,
|
||||
BAIL(NC_EINVAL);
|
||||
|
||||
/* Classic model files have a limit on number of vars. */
|
||||
if(h5->cmode & NC_CLASSIC_MODEL && h5->nvars >= NC_MAX_VARS)
|
||||
BAIL(NC_EMAXVARS);
|
||||
if(h5->cmode & NC_CLASSIC_MODEL && grp->nvars >= NC_MAX_VARS)
|
||||
BAIL(NC_EMAXVARS);
|
||||
|
||||
/* Check that this name is not in use as a var, grp, or type. */
|
||||
if ((retval = nc4_check_dup_name(grp, norm_name)))
|
||||
|
Loading…
Reference in New Issue
Block a user