aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/comm.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix/comm.c')
-rw-r--r--toys/posix/comm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/toys/posix/comm.c b/toys/posix/comm.c
index 6c726cf6..ded262f5 100644
--- a/toys/posix/comm.c
+++ b/toys/posix/comm.c
@@ -48,8 +48,7 @@ void comm_main(void)
if (toys.optflags == 7) return;
for (i = 0; i < 2; i++) {
- file[i] = strcmp("-", toys.optargs[i])
- ? xopen(toys.optargs[i], O_RDONLY) : 0;
+ file[i] = xopenro(toys.optargs[i]);
line[i] = get_line(file[i]);
}