diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/cp/cp.c | 9 | ||||
-rw-r--r-- | bin/rm/rm.c | 7 |
2 files changed, 5 insertions, 11 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 0d0d87a75d1..643d82ed9fa 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cp.c,v 1.43 2016/03/07 18:56:33 tb Exp $ */ +/* $OpenBSD: cp.c,v 1.44 2016/10/14 10:51:57 schwarze Exp $ */ /* $NetBSD: cp.c,v 1.14 1995/09/07 06:14:51 jtc Exp $ */ /* @@ -58,12 +58,11 @@ #include <errno.h> #include <fcntl.h> #include <fts.h> -#include <locale.h> +#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <limits.h> #include "extern.h" @@ -88,8 +87,6 @@ main(int argc, char *argv[]) int Hflag, Lflag, Pflag, ch, fts_options, r; char *target; - (void)setlocale(LC_ALL, ""); - Hflag = Lflag = Pflag = Rflag = 0; while ((ch = getopt(argc, argv, "HLPRfipr")) != -1) switch (ch) { @@ -232,7 +229,7 @@ main(int argc, char *argv[]) type = FILE_TO_DIR; } - exit(copy(argv, type, fts_options)); + return (copy(argv, type, fts_options)); } char * diff --git a/bin/rm/rm.c b/bin/rm/rm.c index b97d1767170..3242ef5f410 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rm.c,v 1.39 2016/06/28 18:00:59 tedu Exp $ */ +/* $OpenBSD: rm.c,v 1.40 2016/10/14 10:51:57 schwarze Exp $ */ /* $NetBSD: rm.c,v 1.19 1995/09/07 06:48:50 jtc Exp $ */ /*- @@ -34,7 +34,6 @@ #include <sys/stat.h> #include <sys/mount.h> -#include <locale.h> #include <err.h> #include <errno.h> #include <fcntl.h> @@ -73,8 +72,6 @@ main(int argc, char *argv[]) { int ch, rflag; - setlocale(LC_ALL, ""); - Pflag = rflag = 0; while ((ch = getopt(argc, argv, "dfiPRr")) != -1) switch(ch) { @@ -124,7 +121,7 @@ main(int argc, char *argv[]) rm_file(argv); } - exit(eval); + return (eval); } void |