Commit 3a8a28e2 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Narrow scope of variable.

parent f11239e3
......@@ -475,17 +475,13 @@ void gribapiAddRecord(stream_t * streamptr, int param, grib_handle *gh,
case ZAXIS_HYBRID:
case ZAXIS_HYBRID_HALF:
{
size_t vctsize;
size_t dummy;
double *vctptr;
GRIB_CHECK(grib_get_long(gh, "NV", &lpar), 0);
/* FIXME: assert(lpar >= 0) */
vctsize = (size_t)lpar;
size_t vctsize = (size_t)lpar;
if ( vctsize > 0 )
{
vctptr = (double *) Malloc(vctsize*sizeof(double));
dummy = vctsize;
double *vctptr = (double *) Malloc(vctsize*sizeof(double));
size_t dummy = vctsize;
GRIB_CHECK(grib_get_double_array(gh, "pv", vctptr, &dummy), 0);
varDefVCT(vctsize, vctptr);
Free(vctptr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment