Re: Quick and dirty malloc() support for realpath.

2009-10-26 Thread Mike Frysinger
On Sunday 25 October 2009 15:19:49 Rob Landley wrote: - int readlinks = 0; + int readlinks = 0, allocated = 0; ... + if (!got_path) { + got_path = alloca(PATH_MAX); + allocated++; + } ... + if (allocated) got_path = strdup(got_path); it doesnt

Re: Quick and dirty malloc() support for realpath.

2009-10-26 Thread Rob Landley
On Monday 26 October 2009 07:20:23 Mike Frysinger wrote: On Sunday 25 October 2009 15:19:49 Rob Landley wrote: - int readlinks = 0; + int readlinks = 0, allocated = 0; ... + if (!got_path) { + got_path = alloca(PATH_MAX); + allocated++; + } ... + if