reallocarray
extern void *reallocarray(void *ptr, size_t nelem, size_t elsize);
pathv = reallocarray(pglob->gl_pathv, newn, sizeof(*pathv));