mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Corrected a potential unix API error.
This commit is contained in:
parent
4596e1bc8b
commit
f62412fa79
@ -1426,7 +1426,7 @@ new_NC_attr(char *name,
|
||||
(*attrp)->nelems = nelems;
|
||||
(*attrp)->xvalue = NULL;
|
||||
(*attrp)->name = name;
|
||||
(*attrp)->name_len = strlen(name);
|
||||
(*attrp)->name_len = (name?strlen(name):0);
|
||||
|
||||
if (nelems > 0) {
|
||||
long long xsz = x_len_NC_attrV(xtype, nelems);
|
||||
|
Loading…
Reference in New Issue
Block a user