summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bftw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bftw.c b/bftw.c
index 0cf5c49..6205d79 100644
--- a/bftw.c
+++ b/bftw.c
@@ -1,6 +1,6 @@
/*********************************************************************
* bfs *
- * Copyright (C) 2015 Tavian Barnes <tavianator@tavianator.com> *
+ * Copyright (C) 2015-2016 Tavian Barnes <tavianator@tavianator.com> *
* *
* This program is free software. It comes without any warranty, to *
* the extent permitted by applicable law. You can redistribute it *
@@ -525,8 +525,8 @@ static void ftwbuf_use_dirent(struct BFTW *ftwbuf, const struct dirent *de) {
}
/** Call stat() and use the results. */
-static int ftwbuf_stat(struct BFTW *ftwbuf, struct stat *sb, int flags) {
- int ret = fstatat(ftwbuf->at_fd, ftwbuf->at_path, sb, flags);
+static int ftwbuf_stat(struct BFTW *ftwbuf, struct stat *sb) {
+ int ret = fstatat(ftwbuf->at_fd, ftwbuf->at_path, sb, ftwbuf->at_flags);
if (ret != 0) {
return ret;
}
@@ -804,11 +804,11 @@ static void bftw_init_buffers(struct bftw_state *state, const struct dirent *de)
|| ftwbuf->typeflag == BFTW_UNKNOWN
|| (ftwbuf->typeflag == BFTW_LNK && follow)
|| (ftwbuf->typeflag == BFTW_DIR && (detect_cycles || xdev))) {
- int ret = ftwbuf_stat(ftwbuf, &state->statbuf, ftwbuf->at_flags);
+ int ret = ftwbuf_stat(ftwbuf, &state->statbuf);
if (ret != 0 && follow && errno == ENOENT) {
// Could be a broken symlink, retry without following
ftwbuf->at_flags = AT_SYMLINK_NOFOLLOW;
- ret = ftwbuf_stat(ftwbuf, &state->statbuf, ftwbuf->at_flags);
+ ret = ftwbuf_stat(ftwbuf, &state->statbuf);
}
if (ret != 0) {