mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-11 16:40:36 +08:00
remove checking against UINT32_MAX
This commit is contained in:
parent
752f31a3d3
commit
49226bb76b
@ -313,16 +313,19 @@ fprintf(stderr, " REC %d %s: %ld\n", ii, (*vpp)->name->cp, (long)index);
|
||||
last = (*vpp);
|
||||
}
|
||||
|
||||
/*
|
||||
* for special case of
|
||||
*/
|
||||
if(last != NULL) {
|
||||
if(ncp->recsize == last->len) { /* exactly one record variable, pack value */
|
||||
ncp->recsize = *last->dsizes * last->xsz;
|
||||
} else if(last->len == UINT32_MAX) { /* huge last record variable */
|
||||
ncp->recsize += *last->dsizes * last->xsz;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* for special case (Check CDF-1 and CDF-2 file format specifications.)
|
||||
* "A special case: Where there is exactly one record variable, we drop the
|
||||
* requirement that each record be four-byte aligned, so in this case there
|
||||
* is no record padding."
|
||||
*/
|
||||
if (last != NULL) {
|
||||
if (ncp->recsize == last->len) {
|
||||
/* exactly one record variable, pack value */
|
||||
ncp->recsize = *last->dsizes * last->xsz;
|
||||
}
|
||||
}
|
||||
|
||||
if(NC_IsNew(ncp))
|
||||
NC_set_numrecs(ncp, 0);
|
||||
return NC_NOERR;
|
||||
|
@ -1230,11 +1230,6 @@ NC_computeshapes(NC3_INFO* ncp)
|
||||
{
|
||||
if(first_rec == NULL)
|
||||
first_rec = *vpp;
|
||||
if((*vpp)->len == UINT32_MAX &&
|
||||
(fIsSet(ncp->flags, NC_64BIT_OFFSET) ||
|
||||
fIsSet(ncp->flags, NC_64BIT_DATA))) /* Flag for large last record */
|
||||
ncp->recsize += (*vpp)->dsizes[0] * (*vpp)->xsz;
|
||||
else
|
||||
ncp->recsize += (*vpp)->len;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user