Commit 04c1f9bb authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Eliminate some unnecessary checks.

* reshGetVal(ue) will always return non-NULL pointers.
parent c55122c8
......@@ -217,13 +217,6 @@ void taxis_copy(taxis_t *taxisptr2, taxis_t *taxisptr1)
}
#endif
static
void taxis_check_ptr(const char *caller, taxis_t *taxisptr)
{
if ( taxisptr == NULL )
Errorc("taxis undefined!");
}
/*
@Function taxisCreate
@Title Create a Time axis
......@@ -276,7 +269,6 @@ int taxisCreate(int taxistype)
void taxisDestroyKernel(taxis_t *taxisptr)
{
taxis_check_ptr(__func__, taxisptr);
int id = taxisptr->self;
delete_refcount_string(taxisptr->name);
delete_refcount_string(taxisptr->longname);
......@@ -328,8 +320,6 @@ void taxisDefType(int taxisID, int type)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->type != type)
{
taxisptr->type = type;
......@@ -355,8 +345,6 @@ void taxisDefVdate(int taxisID, int vdate)
{
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->vdate != vdate)
{
taxisptr->vdate = vdate;
......@@ -382,8 +370,6 @@ void taxisDefVtime(int taxisID, int vtime)
{
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->vtime != vtime)
{
taxisptr->vtime = vtime;
......@@ -409,8 +395,6 @@ void taxisDefRdate(int taxisID, int rdate)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->rdate != rdate)
{
taxisptr->rdate = rdate;
......@@ -436,8 +420,6 @@ void taxisDefRtime(int taxisID, int rtime)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->rtime != rtime)
{
taxisptr->rtime = rtime;
......@@ -463,8 +445,6 @@ void taxisDefFdate(int taxisID, int fdate)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->fdate != fdate)
{
taxisptr->fdate = fdate;
......@@ -490,8 +470,6 @@ void taxisDefFtime(int taxisID, int ftime)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->ftime != ftime)
{
taxisptr->ftime = ftime;
......@@ -519,8 +497,6 @@ void taxisDefCalendar(int taxisID, int calendar)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->calendar != calendar)
{
taxisptr->calendar = calendar;
......@@ -533,8 +509,6 @@ void taxisDefTunit(int taxisID, int unit)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->unit != unit)
{
taxisptr->unit = unit;
......@@ -547,8 +521,6 @@ void taxisDefForecastTunit(int taxisID, int unit)
{
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->fc_unit != unit)
{
taxisptr->fc_unit = unit;
......@@ -561,8 +533,6 @@ void taxisDefForecastPeriod(int taxisID, double fc_period)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->fc_period != fc_period)
{
taxisptr->fc_period = fc_period;
......@@ -575,8 +545,6 @@ void taxisDefNumavg(int taxisID, int numavg)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->numavg != numavg)
{
taxisptr->numavg = numavg;
......@@ -592,8 +560,6 @@ int taxisInqType(int taxisID)
{
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
taxis_check_ptr(__func__, taxisptr);
return (taxisptr->type);
}
......@@ -602,8 +568,6 @@ int taxisHasBounds(int taxisID)
{
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
taxis_check_ptr(__func__, taxisptr);
return (taxisptr->has_bounds);
}
......@@ -612,8 +576,6 @@ void taxisDeleteBounds(int taxisID)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->has_bounds != FALSE)
{
taxisptr->has_bounds = FALSE;
......@@ -627,9 +589,6 @@ void taxisCopyTimestep(int taxisID2, int taxisID1)
taxis_t *taxisptr1 = (taxis_t *)reshGetVal(taxisID1, &taxisOps),
*taxisptr2 = (taxis_t *)reshGetVal(taxisID2, &taxisOps);
taxis_check_ptr(__func__, taxisptr1);
taxis_check_ptr(__func__, taxisptr2);
reshLock();
taxisptr2->rdate = taxisptr1->rdate;
......@@ -676,8 +635,6 @@ int taxisInqVdate(int taxisID)
{
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
taxis_check_ptr(__func__, taxisptr);
return (taxisptr->vdate);
}
......@@ -686,8 +643,6 @@ void taxisInqVdateBounds(int taxisID, int *vdate_lb, int *vdate_ub)
{
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
taxis_check_ptr(__func__, taxisptr);
*vdate_lb = taxisptr->vdate_lb;
*vdate_ub = taxisptr->vdate_ub;
}
......@@ -697,8 +652,6 @@ void taxisDefVdateBounds(int taxisID, int vdate_lb, int vdate_ub)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->vdate_lb != vdate_lb
|| taxisptr->vdate_ub != vdate_ub
|| taxisptr->has_bounds != TRUE)
......@@ -730,8 +683,6 @@ int taxisInqVtime(int taxisID)
{
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
taxis_check_ptr(__func__, taxisptr);
return (taxisptr->vtime);
}
......@@ -740,8 +691,6 @@ void taxisInqVtimeBounds(int taxisID, int *vtime_lb, int *vtime_ub)
{
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
taxis_check_ptr(__func__, taxisptr);
*vtime_lb = taxisptr->vtime_lb;
*vtime_ub = taxisptr->vtime_ub;
}
......@@ -751,8 +700,6 @@ void taxisDefVtimeBounds(int taxisID, int vtime_lb, int vtime_ub)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
if (taxisptr->vtime_lb != vtime_lb
|| taxisptr->vtime_ub != vtime_ub
|| taxisptr->has_bounds != TRUE)
......@@ -782,9 +729,7 @@ The function @func{taxisInqRdate} returns the reference date of a Time axis.
*/
int taxisInqRdate(int taxisID)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
if ( taxisptr->rdate == -1 )
{
......@@ -814,9 +759,7 @@ The function @func{taxisInqRtime} returns the reference time of a Time axis.
*/
int taxisInqRtime(int taxisID)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
if ( taxisptr->rdate == -1 )
{
......@@ -846,9 +789,7 @@ The function @func{taxisInqFdate} returns the forecast reference date of a Time
*/
int taxisInqFdate(int taxisID)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
if ( taxisptr->fdate == -1 )
{
......@@ -877,9 +818,7 @@ The function @func{taxisInqFtime} returns the forecast reference time of a Time
*/
int taxisInqFtime(int taxisID)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
if ( taxisptr->fdate == -1 )
{
......@@ -913,8 +852,6 @@ int taxisInqCalendar(int taxisID)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
return (taxisptr->calendar);
}
......@@ -923,8 +860,6 @@ int taxisInqTunit(int taxisID)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
return (taxisptr->unit);
}
......@@ -933,8 +868,6 @@ int taxisInqForecastTunit(int taxisID)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
return (taxisptr->fc_unit);
}
......@@ -943,8 +876,6 @@ double taxisInqForecastPeriod(int taxisID)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
return (taxisptr->fc_period);
}
......@@ -953,8 +884,6 @@ int taxisInqNumavg(int taxisID)
{
taxis_t *taxisptr = ( taxis_t * ) reshGetVal ( taxisID, &taxisOps );
taxis_check_ptr(__func__, taxisptr);
return (taxisptr->numavg);
}
......@@ -963,8 +892,6 @@ taxis_t *taxisPtr(int taxisID)
{
taxis_t *taxisptr = (taxis_t *)reshGetVal(taxisID, &taxisOps);
taxis_check_ptr(__func__, taxisptr);
return (taxisptr);
}
......@@ -973,7 +900,6 @@ ptaxisDefName(taxis_t *taxisptr, const char *name)
{
if (name)
{
taxis_check_ptr(__func__, taxisptr);
size_t len = strlen(name);
delete_refcount_string(taxisptr->name);
char *taxisname = taxisptr->name = new_refcount_string(len);
......@@ -986,7 +912,6 @@ ptaxisDefLongname(taxis_t *taxisptr, const char *longname)
{
if (longname)
{
taxis_check_ptr(__func__, taxisptr);
size_t len = strlen(longname);
delete_refcount_string(taxisptr->longname);
char *taxislongname = taxisptr->longname = new_refcount_string(len);
......@@ -1482,8 +1407,6 @@ taxisPrintKernel(taxis_t * taxisptr, FILE * fp)
int vdate_lb, vdate_ub;
int vtime_lb, vtime_ub;
taxis_check_ptr ( __func__, taxisptr );
taxisInqVdateBounds ( taxisptr->self, &vdate_lb, &vdate_ub);
taxisInqVtimeBounds ( taxisptr->self, &vtime_lb, &vtime_ub);
......
......@@ -162,20 +162,10 @@ void vlist_copy(vlist_t *vlistptr2, vlist_t *vlistptr1)
vlistptr2->self = vlistID2;
}
static
void vlist_check_ptr(const char *caller, vlist_t *vlistptr)
{
if ( vlistptr == NULL )
Errorc("vlist undefined!");
}
void vlist_lock(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if ( !vlistptr->locked )
{
vlistptr->locked = 1;
......@@ -188,8 +178,6 @@ void vlist_unlock(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if ( vlistptr->locked )
{
vlistptr->locked = 0;
......@@ -235,8 +223,6 @@ int vlistCreate(void)
static void
vlist_delete(vlist_t *vlistptr)
{
vlist_check_ptr(__func__, vlistptr);
int vlistID = vlistptr->self;
vlistDelAtts(vlistID, CDI_GLOBAL);
......@@ -314,9 +300,6 @@ void vlistCopy(int vlistID2, int vlistID1)
vlistptr1 = vlist_to_pointer(vlistID1);
vlistptr2 = vlist_to_pointer(vlistID2);
vlist_check_ptr(__func__, vlistptr1);
vlist_check_ptr(__func__, vlistptr2);
var_t *vlist2vars = vlistptr2->vars;
vlist_copy(vlistptr2, vlistptr1);
......@@ -411,15 +394,8 @@ The function @func{vlistDuplicate} duplicates the variable list from vlistID1.
*/
int vlistDuplicate(int vlistID)
{
int vlistIDnew;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
vlistIDnew = vlistCreate();
int vlistIDnew = vlistCreate();
vlistCopy(vlistIDnew, vlistID);
return (vlistIDnew);
}
......@@ -451,9 +427,6 @@ int vlist_generate_zaxis(int vlistID, int zaxistype, int nlevels, const double *
int zaxisglobdefined = 0;
int has_bounds = FALSE;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
int zaxisdefined = 0;
int nzaxis = vlistptr->nzaxis;
......@@ -539,10 +512,6 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
{
vlist_t *vlistptr1 = vlist_to_pointer(vlistID1),
*vlistptr2 = vlist_to_pointer(vlistID2);
vlist_check_ptr(__func__, vlistptr1);
vlist_check_ptr(__func__, vlistptr2);
vlist_copy(vlistptr2, vlistptr1);
vlistCopyVarAtts(vlistID1, CDI_GLOBAL, vlistID2, CDI_GLOBAL);
......@@ -742,9 +711,6 @@ void vlistCat(int vlistID2, int vlistID1)
vlist_t *vlistptr1 = vlist_to_pointer(vlistID1),
*vlistptr2 = vlist_to_pointer(vlistID2);
vlist_check_ptr(__func__, vlistptr1);
vlist_check_ptr(__func__, vlistptr2);
int nvars1 = vlistptr1->nvars;
int nvars2 = vlistptr2->nvars;
int nvars = nvars1 + nvars2;
......@@ -857,9 +823,6 @@ void vlistMerge(int vlistID2, int vlistID1)
vlist_t *vlistptr1 = vlist_to_pointer(vlistID1),
*vlistptr2 = vlist_to_pointer(vlistID2);
vlist_check_ptr(__func__, vlistptr1);
vlist_check_ptr(__func__, vlistptr2);
int nvars1 = vlistptr1->nvars;
int nvars2 = vlistptr2->nvars;
......@@ -990,9 +953,6 @@ The function @func{vlistNvars} returns the number of variables in the variable l
int vlistNvars(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
return (vlistptr->nvars);
}
......@@ -1002,8 +962,6 @@ int vlistNrecs(int vlistID)
int nrecs = 0;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
for ( int varID = 0; varID < vlistptr->nvars; varID++ )
nrecs += zaxisInqSize(vlistptr->vars[varID].zaxisID);
......@@ -1016,8 +974,6 @@ int vlistNumber(int vlistID)
int number, number2, datatype;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
datatype = vlistptr->vars[0].datatype;
if ( datatype== DATATYPE_CPX32 || datatype == DATATYPE_CPX64 )
number = CDI_COMP;
......@@ -1062,8 +1018,6 @@ int vlistNgrids(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
return (vlistptr->ngrids);
}
......@@ -1087,8 +1041,6 @@ int vlistNzaxis(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
return (vlistptr->nzaxis);
}
......@@ -1097,8 +1049,6 @@ void vlistDefNtsteps(int vlistID, int nts)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if (vlistptr->ntsteps != nts)
{
vlistptr->ntsteps = nts;
......@@ -1111,8 +1061,6 @@ int vlistNtsteps(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
return (vlistptr->ntsteps);
}
......@@ -1121,8 +1069,6 @@ vlistPrintKernel(vlist_t *vlistptr, FILE * fp )
{
char paramstr[32];
vlist_check_ptr(__func__, vlistptr);
fprintf ( fp, "#\n# vlistID %d\n#\n", vlistptr->self);
int nvars = vlistptr->nvars;
......@@ -1207,7 +1153,6 @@ void vlistPrint(int vlistID)
{
if ( vlistID == CDI_UNDEFID ) return;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
vlistPrintKernel(vlistptr, stdout);
}
......@@ -1229,8 +1174,6 @@ void vlistDefTaxis(int vlistID, int taxisID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if (vlistptr->taxisID != taxisID)
{
vlistptr->taxisID = taxisID;
......@@ -1258,8 +1201,6 @@ int vlistInqTaxis(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
return (vlistptr->taxisID);
}
......@@ -1268,8 +1209,6 @@ void vlistDefTable(int vlistID, int tableID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if (vlistptr->tableID != tableID)
{
vlistptr->tableID = tableID;
......@@ -1282,8 +1221,6 @@ int vlistInqTable(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
return (vlistptr->tableID);
}
......@@ -1292,8 +1229,6 @@ void vlistDefInstitut(int vlistID, int instID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if (vlistptr->instID != instID)
{
vlistptr->instID = instID;
......@@ -1306,8 +1241,6 @@ int vlistInqInstitut(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
int instID = vlistptr->instID;
if ( instID == CDI_UNDEFID )
......@@ -1331,8 +1264,6 @@ void vlistDefModel(int vlistID, int modelID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if (vlistptr->modelID != modelID)
{
vlistptr->modelID = modelID;
......@@ -1345,8 +1276,6 @@ int vlistInqModel(int vlistID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
int modelID = vlistptr->modelID;
if ( modelID == CDI_UNDEFID )
......@@ -1372,8 +1301,6 @@ int vlistGridsizeMax(int vlistID)
int gridsizemax = 0;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
for ( int index = 0 ; index < vlistptr->ngrids ; index++ )
{
int gridID = vlistptr->gridIDs[index];
......@@ -1390,8 +1317,6 @@ int vlistGrid(int vlistID, int index)
int gridID = CDI_UNDEFID;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if ( index < vlistptr->ngrids && index >= 0 )
gridID = vlistptr->gridIDs[index];
......@@ -1404,8 +1329,6 @@ int vlistGridIndex(int vlistID, int gridID)
int index;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
for ( index = 0 ; index < vlistptr->ngrids ; index++ )
if ( gridID == vlistptr->gridIDs[index] ) break;
......@@ -1419,8 +1342,6 @@ void vlistChangeGridIndex(int vlistID, int index, int gridID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
int gridIDold = vlistptr->gridIDs[index];
if (gridIDold != gridID)
{
......@@ -1439,8 +1360,6 @@ void vlistChangeGrid(int vlistID, int gridID1, int gridID2)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if (gridID1 != gridID2)
{
int ngrids = vlistptr->ngrids;
......@@ -1466,8 +1385,6 @@ int vlistZaxis(int vlistID, int index)
int zaxisID = CDI_UNDEFID;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
if ( index < vlistptr->nzaxis && index >= 0 )
zaxisID = vlistptr->zaxisIDs[index];
......@@ -1478,8 +1395,6 @@ int vlistZaxisIndex(int vlistID, int zaxisID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
int index;
for ( index = 0 ; index < vlistptr->nzaxis ; index++ )
if ( zaxisID == vlistptr->zaxisIDs[index] ) break;
......@@ -1494,8 +1409,6 @@ void vlistChangeZaxisIndex(int vlistID, int index, int zaxisID)
{
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
int zaxisIDold = vlistptr->zaxisIDs[index];
if (zaxisIDold != zaxisID)
{
......@@ -1526,8 +1439,6 @@ void vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2)
int nlevs1 = zaxisInqSize(zaxisID1), nlevs2 = zaxisInqSize(zaxisID2);
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
int nzaxis = vlistptr->nzaxis;
for ( int index = 0; index < nzaxis; index++ )
{
......@@ -1563,8 +1474,6 @@ int vlistHasTime(int vlistID)
int hastime = FALSE;
vlist_t *vlistptr = vlist_to_pointer(vlistID);
vlist_check_ptr(__func__, vlistptr);
for ( int varID = 0; varID < vlistptr->nvars; varID++ )