summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-10-18 19:51:13 -0400
committerTavian Barnes <tavianator@tavianator.com>2016-10-18 19:51:13 -0400
commitb0216b9154915a60e981a0082d77930687475d54 (patch)
tree2c48d6982b2adcadc35ed005a631dd6be73177ae /main.c
parentc2e9f525239d8bd9e46b7540c23c26a26a5d66f6 (diff)
downloadbfs-b0216b9154915a60e981a0082d77930687475d54.tar.xz
main: IN is read, OUT is write.
Oops :/
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 2a32b3a..03c5020 100644
--- a/main.c
+++ b/main.c
@@ -62,13 +62,13 @@ static int ensure_fd_open(int fd, int flags) {
int main(int argc, char *argv[]) {
int ret = EXIT_FAILURE;
- if (ensure_fd_open(STDIN_FILENO, O_WRONLY) != 0) {
+ if (ensure_fd_open(STDIN_FILENO, O_RDONLY) != 0) {
goto done;
}
- if (ensure_fd_open(STDOUT_FILENO, O_RDONLY) != 0) {
+ if (ensure_fd_open(STDOUT_FILENO, O_WRONLY) != 0) {
goto done;
}
- if (ensure_fd_open(STDERR_FILENO, O_RDONLY) != 0) {
+ if (ensure_fd_open(STDERR_FILENO, O_WRONLY) != 0) {
goto done;
}