Re: PATCH: Do not call xmalloc_failed in expandargv

DJ Delorie
2005-09-27T15:40:38Z

> if (!*argvp)
> ! {
> ! fprintf (stderr, "\n%sout of memory\n");
> ! xexit (1);
> ! }

I seem to recall a general policy (before my time) that libiberty
functions shouldn't ever exit on error; the proper response is to
return some error condition to the application. Since expandargv()
doesn't have an error response, IMHO the right thing to do is treat
@foo as if it weren't a file and just return the original argv[n].
The application will hopefully discover the out of memory condition
itself and use its own handlers to deal with it.