summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2016-05-29 10:41:27 +0000
committered <ed@FreeBSD.org>2016-05-29 10:41:27 +0000
commitc2282cdf4ee0c39f911689e2e07bf659ff576c7c (patch)
tree447ee0796aaca8e939d1f6b52395f92fa51ff8eb /lib/libc
parent8cfacdd69c51b54ffaadc2c4fdc8e8a0b21b1791 (diff)
downloadFreeBSD-src-c2282cdf4ee0c39f911689e2e07bf659ff576c7c.zip
FreeBSD-src-c2282cdf4ee0c39f911689e2e07bf659ff576c7c.tar.gz
Invoke the dirname() function in a POSIX compliant way.
POSIX requires that the argument of dirname() is of type "char *". In other words, the input buffer can be modified by the function to store the directory name. Pull a copy of the string before calling dirname(). We don't care about freeing up the memory afterwards, as this is done at the very bottom of main(), right before the program terminates. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D6628
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud