=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tee/tee.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- src/usr.bin/tee/tee.c 2015/10/09 01:37:09 1.10 +++ src/usr.bin/tee/tee.c 2016/10/28 07:22:59 1.11 @@ -1,4 +1,4 @@ -/* $OpenBSD: tee.c,v 1.10 2015/10/09 01:37:09 deraadt Exp $ */ +/* $OpenBSD: tee.c,v 1.11 2016/10/28 07:22:59 schwarze Exp $ */ /* $NetBSD: tee.c,v 1.5 1994/12/09 01:43:39 jtc Exp $ */ /* @@ -32,15 +32,15 @@ #include #include -#include + +#include #include #include -#include +#include #include #include #include -#include -#include +#include struct list { struct list *next; @@ -72,8 +72,6 @@ int append, ch, exitval; char buf[8192]; - setlocale(LC_ALL, ""); - if (pledge("stdio wpath cpath", NULL) == -1) err(1, "pledge"); @@ -86,10 +84,9 @@ case 'i': (void)signal(SIGINT, SIG_IGN); break; - case '?': default: (void)fprintf(stderr, "usage: tee [-ai] [file ...]\n"); - exit(1); + return 1; } } argv += optind; @@ -137,5 +134,5 @@ } } - exit(exitval); + return exitval; }