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/printf | |
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/printf')
-rw-r--r-- | usr.bin/printf/printf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 60cee4a5144..0765a301c45 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printf.c,v 1.20 2014/04/18 11:35:51 guenther Exp $ */ +/* $OpenBSD: printf.c,v 1.21 2014/05/20 01:25:23 guenther Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -489,7 +489,7 @@ check_conversion(const char *s, const char *ep) warnx ("%s: not completely converted", s); rval = 1; } else if (errno == ERANGE) { - warnx ("%s: %s", s, strerror(ERANGE)); + warnc(ERANGE, "%s", s); rval = 1; } } |