Commit f5be54d6 authored by David Dykstra's avatar David Dykstra

Some systems, notably Sunos4, do not support realloc(NULL, n), so if

nothing has yet been malloced in flist_expand(), call malloc instead of
realloc.  Problem introduced in revision 1.106 of flist.c on January 25.
parent 1e19f7ba
......@@ -301,7 +301,10 @@ static void flist_expand(struct file_list *flist)
new_bytes = sizeof(flist->files[0]) * flist->malloced;
new_ptr = realloc(flist->files, new_bytes);
if (flist->files)
new_ptr = realloc(flist->files, new_bytes);
else
new_ptr = malloc(new_bytes);
if (verbose >= 2) {
rprintf(FINFO, "expand file_list to %.0f bytes, did%s move\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment