diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-03-09 08:46:50 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-03-09 08:57:56 -0500 |
commit | ec6de1ebefe65f9a4be0edafeda3d6caeea1442d (patch) | |
tree | 07dbed5ded391be0e3deb754676238188ee1b7b1 /ctx.c | |
parent | 050fedea006f8e03f7d9f55fef7d6fee35c622b6 (diff) | |
download | bfs-ec6de1ebefe65f9a4be0edafeda3d6caeea1442d.tar.xz |
ctx: Don't include std{out,err} in the open file count
Diffstat (limited to 'ctx.c')
-rw-r--r-- | ctx.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -189,7 +189,11 @@ CFILE *bfs_ctx_dedup(struct bfs_ctx *ctx, CFILE *cfile, const char *path) { ctx_file->cfile = cfile; ctx_file->path = path; - ++ctx->nfiles; + + if (cfile != ctx->cout && cfile != ctx->cerr) { + ++ctx->nfiles; + } + return cfile; } |