summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2015-03-10 13:00:58 +0000
committerchristos <christos@NetBSD.org>2015-03-10 13:00:58 +0000
commit2ad5e7517e3fba9bb08f8d0621bab0821145f9b9 (patch)
tree990ad5962850e90cd826ee470476d68c01531bf7 /lib/libc/stdlib
parente0f295570c26deecd0b61b68e2784a7db767767a (diff)
PR/49640: Kamil Rytarowski: Improve error printing
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/strtol.36
-rw-r--r--lib/libc/stdlib/strtoul.36
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/stdlib/strtol.3 b/lib/libc/stdlib/strtol.3
index 5eb586bea6a..ea257fd18fa 100644
--- a/lib/libc/stdlib/strtol.3
+++ b/lib/libc/stdlib/strtol.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: strtol.3,v 1.29 2015/01/18 18:01:41 christos Exp $
+.\" $NetBSD: strtol.3,v 1.30 2015/03/10 13:00:58 christos Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" from: @(#)strtol.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd December 27, 2014
+.Dd Match 10, 2015
.Dt STRTOL 3
.Os
.Sh NAME
@@ -243,7 +243,7 @@ function is the simplest to use:
int e;
intmax_t lval = strtoi(buf, NULL, 0, 1, 99, &e);
if (e)
- warn("conversion of `%s' to a number failed, using %jd",
+ warnc(e, "conversion of `%s' to a number failed, using %jd",
buf, lval);
.Ed
.Pp
diff --git a/lib/libc/stdlib/strtoul.3 b/lib/libc/stdlib/strtoul.3
index ee0ebdebe55..5cb548878ff 100644
--- a/lib/libc/stdlib/strtoul.3
+++ b/lib/libc/stdlib/strtoul.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: strtoul.3,v 1.28 2015/01/18 18:01:41 christos Exp $
+.\" $NetBSD: strtoul.3,v 1.29 2015/03/10 13:00:58 christos Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" from: @(#)strtoul.3 8.1 (Berkeley) 6/4/93
.\"
-.Dd December 27, 2014
+.Dd March 10, 2015
.Dt STRTOUL 3
.Os
.Sh NAME
@@ -240,7 +240,7 @@ function is the simplest to use:
int e;
uintmax_t lval = strtou(buf, NULL, 0, 1, 99, &e);
if (e)
- warn("conversion of `%s' to a number failed, using %ju",
+ warnc(e, "conversion of `%s' to a number failed, using %ju",
buf, lval);
.Ed
.Pp