HomeFreeBSD

Invoke the dirname() function in a POSIX compliant way.

Description

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

Details

Provenance
edAuthored on
Reviewer
bapt
Differential Revision
D6628: Invoke the dirname() function in a POSIX compliant way.
Parents
rS300951: ARM GIC: Allow to setup interrupt without configuration data.
Branches
Unknown
Tags
Unknown