mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
tests: Avoid realpath(x, NULL)
Giving NULL as the second argument to realpath isn't supported by some platforms, including Solaris 10. Pass an allocated buffer instead. Change-Id: Iec1268906d6a032e1b38b120e54fa5d9c31102c6 Reviewed-on: https://gerrit.openafs.org/15438 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net>
This commit is contained in:
parent
e34e7bdf42
commit
ba762b83d4
@ -120,12 +120,14 @@ path_from_tdir(char *env_var, char *filename)
|
||||
/* 'tdir' points to the 'tests' dir, so go up one level to get to the top
|
||||
* srcdir/objdir. */
|
||||
top_rel = afstest_asprintf("%s/..", tdir);
|
||||
top_abs = realpath(top_rel, NULL);
|
||||
free(top_rel);
|
||||
top_abs = bcalloc(1, PATH_MAX);
|
||||
top_abs = realpath(top_rel, top_abs);
|
||||
if (top_abs == NULL) {
|
||||
sysbail("realpath");
|
||||
}
|
||||
|
||||
free(top_rel);
|
||||
|
||||
/*
|
||||
* The given 'filename' is relative to the top srcdir/objdir, so to get the
|
||||
* full path, append 'filename' to the top srcdir/objdir. Note that the
|
||||
|
Loading…
Reference in New Issue
Block a user