bore

basic core utilities (PD)
git clone git://bvnf.space/bore.git
Log | Files | Refs | README

commit f879a55e9b435260e81455e5814483dcc218e2cd
parent a5924f2c4c0c4d41243c1ae70af556cc1799a876
Author: phoebos <ben@bvnf.space>
Date:   Tue, 11 Oct 2022 11:06:13 +0100

tee: getopt returns -1 not EOF

Diffstat:
Mtee.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tee.c b/tee.c @@ -40,7 +40,7 @@ main(int argc, char **argv) { int flags = O_WRONLY | O_CREAT; int c; - while ((c = getopt(argc, argv, "ai")) != EOF) { + while ((c = getopt(argc, argv, "ai")) != -1) { switch (c) { case 'a': flags |= O_APPEND;