diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-07-05 11:04:45 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2025-01-20 15:19:48 +0100 |
commit | 525e5f13de043a1eae59e2184afeed2d72c6de48 (patch) | |
tree | e3b08d24e79ad05370a2cb7cc78fe12cc084769e /stdlib/groupingwc.c | |
parent | 5eae2754008650e411fa9d2ddc731dcd62983c75 (diff) | |
download | glibc-525e5f13de043a1eae59e2184afeed2d72c6de48.zip glibc-525e5f13de043a1eae59e2184afeed2d72c6de48.tar.gz glibc-525e5f13de043a1eae59e2184afeed2d72c6de48.tar.bz2 |
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: Siddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f)
Diffstat (limited to 'stdlib/groupingwc.c')
0 files changed, 0 insertions, 0 deletions