. make common.o link with the tests instead of being
#included as common.c
. fix warnings about missing prototypes by declaring functions
static
. reduces some duplicated code
Change-Id: Ic2a765d7f5886add5863190efec3fdd2d2ea2137
- Remove unused code
- Use standard functions declared in common.c
- Change tests to do a runtime test for the max name length of a path
component (aka NAME_MAX). The actual value might differ from the hard
coded NAME_MAX depending on the file system used.
The opendir(3) function was setting errno to ENOTDIR even
when the directory existed and was opened successfully. This
caused git to falsely detect an error.
This change moves the errno assignment into the failure code
block. It also adds a test to test24 to check for errno
changing when opendir(3) returns success.