mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2025-04-21 12:27:27 +03:00
eeshow/misc/util.h (realloc_size, realloc_type_n): get rid of bare "realloc"
Finally ! Shoulds have done this a long time ago.
This commit is contained in:
@@ -46,10 +46,8 @@ static struct hist *new_commit(unsigned branch)
|
||||
|
||||
static void uplink(struct hist *down, struct hist *up)
|
||||
{
|
||||
down->newer = realloc(down->newer,
|
||||
sizeof(struct hist *) * (down->n_newer + 1));
|
||||
if (!down->newer)
|
||||
diag_pfatal("realloc");
|
||||
down->newer = realloc_type_n(down->newer, struct hist *,
|
||||
down->n_newer + 1);
|
||||
down->newer[down->n_newer++] = up;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user