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

Switch SRV grid template to dynamic memory.

parent cb3817de
......@@ -209,15 +209,16 @@ void srv_add_record(stream_t *streamptr, int param, int level, int xsize, int ys
record->param = param;
record->ilevel = level;
grid_t grid;
grid_init(&grid);
grid.type = GRID_GENERIC;
grid.size = xsize*ysize;
grid.xsize = xsize;
grid.ysize = ysize;
grid.xvals = NULL;
grid.yvals = NULL;
int gridID = varDefGrid(vlistID, &grid, 0);
grid_t *grid = (grid_t *)Malloc(sizeof (*grid));
grid_init(grid);
grid->type = GRID_GENERIC;
grid->size = xsize*ysize;
grid->xsize = xsize;
grid->ysize = ysize;
grid->xvals = NULL;
grid->yvals = NULL;
int gridID = varDefGrid(vlistID, grid, 0);
Free(grid);
/*
if ( level == 0 ) leveltype = ZAXIS_SURFACE;
else leveltype = ZAXIS_GENERIC;
......
Supports Markdown
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