INNER CODE UNIT · C
old_m
lh3/bedtk · bedtk.c:222
int64_t old_m = r->m;
r->m = r->m? r->m<<1 : 16;
r->a = (bed_rest1_t*)realloc(r->a, r->m * sizeof(bed_rest1_t));
memset(&r->a[old_m], 0, (r->m - old_m) * sizeof(bed_rest1_t));
}
p = &r->a[r->n++];
p->l = rest? str.l - (rest - str.s) : 0;
if (rest) {
p->s = (char*)malloc(p->l + 1);
memcpy(p->s, rest, p->l);
p->s[p->l] = 0;
}
}
++k;
}
}
if (k > INT32_MAX)
fprintf(stderr, "WARNING: more than %d records; some functionality may not work!\n", INT32_MAX);