summaryrefslogtreecommitdiff
path: root/usr.bin/csplit
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-05-20 01:25:25 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-05-20 01:25:25 +0000
commit597da3199199b14e2722a1ada9fccb3737814d7f (patch)
treeb475f359033bb4063109bd5404e3d5a943578b0d /usr.bin/csplit
parentf45d4774a3a08f1a090fecf301051d4c28ec94f6 (diff)
Use errc/warnc to simplify code.
Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@
Diffstat (limited to 'usr.bin/csplit')
-rw-r--r--usr.bin/csplit/csplit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/csplit/csplit.c b/usr.bin/csplit/csplit.c
index d90c488eb08..56dc28c749a 100644
--- a/usr.bin/csplit/csplit.c
+++ b/usr.bin/csplit/csplit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: csplit.c,v 1.4 2012/03/04 04:05:15 fgsch Exp $ */
+/* $OpenBSD: csplit.c,v 1.5 2014/05/20 01:25:23 guenther Exp $ */
/* $FreeBSD: src/usr.bin/csplit/csplit.c,v 1.9 2004/03/22 11:15:03 tjr Exp $ */
/*-
@@ -239,7 +239,7 @@ newfile(void)
if ((size_t)snprintf(currfile, sizeof(currfile), "%s%0*ld", prefix,
(int)sufflen, nfiles) >= sizeof(currfile))
- errx(1, "%s: %s", currfile, strerror(ENAMETOOLONG));
+ errc(1, ENAMETOOLONG, "%s", currfile);
if ((fp = fopen(currfile, "w+")) == NULL)
err(1, "%s", currfile);
nfiles++;