Skip to content
Commit ef070000 authored by Florian Weimer's avatar Florian Weimer
Browse files

stdlib: Simplify buffer management in canonicalize



Move the buffer management from realpath_stk to __realpath.  This
allows returning directly after allocation errors.

Always make a copy of the result buffer using strdup even if it is
already heap-allocated.  (Heap-allocated buffers are somewhat rare.)
This avoids GCC warnings at certain optimization levels.

Reviewed-by: default avatarSiddhesh Poyarekar <siddhesh@sourceware.org>
parent 9d77023b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment