int16_t id, uint8_t struct_id,
struct NextAndId ** start)
{
- char * f_name = "add_to_struct_list()";
- struct NextAndId * nai = try_malloc(n_size, f_name);
+ struct NextAndId * nai = try_malloc(n_size, __func__);
memset(nai, 0, n_size);
nai->id = (start_id<=id && id<=UINT8_MAX) ? id : get_unused_id(struct_id);
struct NextAndId ** nai_ptr_ptr = start;
{
struct Thing * t;
t = (struct Thing *) add_to_struct_list(sizeof(struct Thing), 0, id, 0,
- (struct NextAndId **) &world.things);
+ (struct NextAndId **)&world.things);
struct ThingType * tt = get_thing_type(type);
set_cleanup_flag(CLEANUP_THINGS);
t->type = tt->id;