summaryrefslogtreecommitdiff
path: root/usr.bin/fold/fold.c
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>2001-07-09 21:59:03 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>2001-07-09 21:59:03 +0000
commit4f63ae5127d6ba78d2ca86e52f0aa8e7ecacca5a (patch)
treeb809fecda31971111d3eae05f062fb93a6f0ffed /usr.bin/fold/fold.c
parent909f7f6a813bbc7ddaff531a5d9fb651c0bd3a1b (diff)
use errx()
Diffstat (limited to 'usr.bin/fold/fold.c')
-rw-r--r--usr.bin/fold/fold.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/fold/fold.c b/usr.bin/fold/fold.c
index abd783848aa..dae17817535 100644
--- a/usr.bin/fold/fold.c
+++ b/usr.bin/fold/fold.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fold.c,v 1.3 1999/02/07 21:40:49 deraadt Exp $ */
+/* $OpenBSD: fold.c,v 1.4 2001/07/09 21:59:02 pjanzen Exp $ */
/* $NetBSD: fold.c,v 1.6 1995/09/01 01:42:44 jtc Exp $ */
/*-
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)fold.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: fold.c,v 1.3 1999/02/07 21:40:49 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: fold.c,v 1.4 2001/07/09 21:59:02 pjanzen Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -82,11 +82,8 @@ main(argc, argv)
split_words = 1;
break;
case 'w':
- if ((width = atoi(optarg)) <= 0) {
- (void)fprintf(stderr,
- "fold: illegal width value.\n");
- exit(1);
- }
+ if ((width = atoi(optarg)) <= 0)
+ errx(1, "illegal width value.");
break;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':