comparison src/libmlk-rpg/rpg/map-file.c @ 404:7321511052f6

core: rework alloc module
author David Demelier <markand@malikania.fr>
date Sat, 02 Apr 2022 16:58:33 +0200
parents 460c78706989
children d74f53299252
comparison
equal deleted inserted replaced
403:7536be134718 404:7321511052f6
276 struct zfile zf; 276 struct zfile zf;
277 int ret = 0; 277 int ret = 0;
278 278
279 memset(map, 0, sizeof (*map)); 279 memset(map, 0, sizeof (*map));
280 280
281 if (alloc_pool_init(&file->blocks, sizeof (*map->blocks), NULL) < 0) 281 alloc_pool_init(&file->blocks, sizeof (*map->blocks), NULL);
282 goto fail; 282
283 if (zfile_open(&zf, path) < 0) 283 if (zfile_open(&zf, path) < 0)
284 goto fail; 284 goto fail;
285 285
286 ctx.fp = zf.fp; 286 ctx.fp = zf.fp;
287 287