Merge pull request #2550 from ibaned/strlen-ambiguous

Rename variable to avoid function name conflict
This commit is contained in:
Ward Fisher 2022-11-08 10:39:32 -07:00 committed by GitHub
commit 7de5b8fcc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -530,7 +530,7 @@ ncz_nctypedecode(const char* snctype, nc_type* nctypep)
*/ */
int int
ncz_nctype2dtype(nc_type nctype, int endianness, int purezarr, int strlen, char** dnamep) ncz_nctype2dtype(nc_type nctype, int endianness, int purezarr, int len, char** dnamep)
{ {
char dname[64]; char dname[64];
char* format = NULL; char* format = NULL;
@ -540,7 +540,7 @@ ncz_nctype2dtype(nc_type nctype, int endianness, int purezarr, int strlen, char*
format = znames[nctype].zarr[endianness]; format = znames[nctype].zarr[endianness];
else else
format = znames[nctype].nczarr[endianness]; format = znames[nctype].nczarr[endianness];
snprintf(dname,sizeof(dname),format,strlen); snprintf(dname,sizeof(dname),format,len);
if(dnamep) *dnamep = strdup(dname); if(dnamep) *dnamep = strdup(dname);
return NC_NOERR; return NC_NOERR;
} }