Merge pull request 'Fix resetting fd counter to -1' (#201) from dirkmueller/pv:main into main

Reviewed-on: https://codeberg.org/ivarch/pv/pulls/201
This commit is contained in:
Andrew Wood
2026-06-14 21:36:41 +02:00
+1 -1
View File
@@ -419,7 +419,7 @@ static int pv__monitor(pvstate_t state, opts_t opts, pvformatoptions_s format_op
/* Common idiom to close an fd, and set it to -1, if it's open. */
#define close_if_open(x) if (-1 != x) { \
(void) close(x); \
x = 1; \
x = -1; \
}
/* Create a process to run the command. */