diff options
-rw-r--r-- | bftw.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) { |