summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-22 18:26:19 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-22 18:26:19 +0000
commit00da81c1a5f0ac684f603f180757ed1073dd38f2 (patch)
treefea5ab339c9d3dbad93f98105f6ef2673195f372 /usr.bin
parentf9423b9d3392df4fc3aa1dbe98560b6660f2cadb (diff)
Use dirfd(dirp) instead of dirp->dd_fd.
No binary change.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/oldrdist/expand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/oldrdist/expand.c b/usr.bin/oldrdist/expand.c
index e07ecd0e036..a634c5b8263 100644
--- a/usr.bin/oldrdist/expand.c
+++ b/usr.bin/oldrdist/expand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expand.c,v 1.13 2011/04/06 11:36:26 miod Exp $ */
+/* $OpenBSD: expand.c,v 1.14 2011/07/22 18:26:18 matthew Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -300,7 +300,7 @@ matchdir(pattern)
return;
goto patherr2;
}
- if (fstat(dirp->dd_fd, &stb) < 0)
+ if (fstat(dirfd(dirp), &stb) < 0)
goto patherr1;
if (!ISDIR(stb.st_mode)) {
errno = ENOTDIR;