diff options
author | 2014-05-20 01:25:23 +0000 | |
---|---|---|
committer | 2014-05-20 01:25:23 +0000 | |
commit | 5ad04d351680822078003e2b066cfc9680d6157d (patch) | |
tree | bc78d1cc74e659478aa86d8884efcb9a0d678e50 /usr.bin/csplit | |
parent | Bring UTF8_{getc,putc} up-to-date: it's been a decade since 5- and 6-byte (diff) | |
download | wireguard-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.c | 4 |
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++; |