122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
static void*
copy(void *ptr)
{
CFWMap *map = ptr;
CFWMap *new;
uint32_t i;
if ((new = cfw_new(cfw_map, NULL)) == NULL)
return NULL;
if ((new->data = malloc(sizeof(*new->data) * map->size)) == NULL)
return NULL;
new->size = map->size;
for (i = 0; i < map->size; i++) {
|
|
|
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
static void*
copy(void *ptr)
{
CFWMap *map = ptr;
CFWMap *new;
uint32_t i;
if ((new = cfw_new(cfw_map, (void*)NULL)) == NULL)
return NULL;
if ((new->data = malloc(sizeof(*new->data) * map->size)) == NULL)
return NULL;
new->size = map->size;
for (i = 0; i < map->size; i++) {
|