optimize get_current_dir_name to reduce stack bloat
authorRich Felker <dalias@aerifal.cx>
Fri, 13 Dec 2013 07:25:09 +0000 (02:25 -0500)
committerRich Felker <dalias@aerifal.cx>
Fri, 13 Dec 2013 07:25:09 +0000 (02:25 -0500)
our getcwd already (as an extension) supports allocation of a buffer
when the buffer argument is a null pointer, so there's no need to
duplicate the allocation logic in this wrapper function. duplicating
it is actually harmful in that it doubles the stack usage from
PATH_MAX to 2*PATH_MAX.


No differences found