summaryrefslogtreecommitdiffstats
path: root/usr.bin/csplit
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-05-20 01:25:23 +0000
committerguenther <guenther@openbsd.org>2014-05-20 01:25:23 +0000
commit5ad04d351680822078003e2b066cfc9680d6157d (patch)
treebc78d1cc74e659478aa86d8884efcb9a0d678e50 /usr.bin/csplit
parentBring UTF8_{getc,putc} up-to-date: it's been a decade since 5- and 6-byte (diff)
downloadwireguard-openbsd-5ad04d351680822078003e2b066cfc9680d6157d.tar.xz
wireguard-openbsd-5ad04d351680822078003e2b066cfc9680d6157d.zip
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++;