X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fglob.c;h=5be8c321174a61d74b39c27b744995c092b2227c;hb=93785052e7a8c1ca5f263a39c3e77286f487e22d;hp=03b55df28da1356b72fd97407f87c83b09b5933a;hpb=2ce5b03dcb01f6554b59e19719396803ad34ca01;p=pspp diff --git a/lib/glob.c b/lib/glob.c index 03b55df28d..5be8c32117 100644 --- a/lib/glob.c +++ b/lib/glob.c @@ -1282,6 +1282,8 @@ link_exists_p (int dfd, const char *dir, size_t dirlen, const char *fname, return link_exists2_p (dir, dirlen, fname, pglob); else { + /* dfd cannot be -1 here, because dirfd never returns -1 on + glibc, or on hosts that have fstatat. */ struct_stat64 st64; return __fxstatat64 (_STAT_VER, dfd, fname, &st64, 0) == 0; }