> > > - if ((new = reallocarray(comm->communities, newsize, > > > - sizeof(struct community))) == NULL) > > > + if ((new = recallocarray(comm->communities, comm->size, > > > + newsize, sizeof(struct community))) == NULL) > > > fatal(__func__); > > > - memset(new + comm->size, 0, 8 * sizeof(struct community)); > > > > Since you fatal on failure, new doesn't really add anything > > I prefer to always use the extra variable.
I see. It's rpki-client that almost always reuses the same variable. Fwiw: There's one reuse in rib_new(). > But that would set ATTR_PARTIAL independent of type. Now one could set > is_partial to the right value based on type. Not sure if that changes much > though. Ah right. I was being silly.