Commit a1b5125b authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Merge declaration and initialization in define_all_grids.

parent 191ec2e3
......@@ -6499,12 +6499,10 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
size = xsize*ysize;
/* Check size of 2 dimensional coordinate variables */
{
int dimid;
size_t dimsize1, dimsize2;
dimid = ncvars[xvarid].dimids[ndims-2];
dimsize1 = ncdims[dimid].len;
int dimid = ncvars[xvarid].dimids[ndims-2];
size_t dimsize1 = ncdims[dimid].len;
dimid = ncvars[xvarid].dimids[ndims-1];
dimsize2 = ncdims[dimid].len;
size_t dimsize2 = ncdims[dimid].len;
if ( dimsize1*dimsize2 == size ) skipvar = FALSE;
}
}
......@@ -6513,10 +6511,8 @@ void define_all_grids(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int nva
size = xsize;
/* Check size of 1 dimensional coordinate variables */
{
int dimid;
size_t dimsize;
dimid = ncvars[xvarid].dimids[0];
dimsize = ncdims[dimid].len;
int dimid = ncvars[xvarid].dimids[0];
size_t dimsize = ncdims[dimid].len;
if ( dimsize == size ) skipvar = FALSE;
}
}
......
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