summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/strtonum.c
diff options
context:
space:
mode:
authormarc <marc@openbsd.org>2004-06-21 23:12:25 +0000
committermarc <marc@openbsd.org>2004-06-21 23:12:25 +0000
commit5c9e55858557a0b2f057780c947883b34155cd7b (patch)
tree45b04096b0c991edf2ba9150767ea73ef4eef350 /lib/libc/stdlib/strtonum.c
parentPut back the moving of schedstate_percpu into sched.h. This time expose (diff)
downloadwireguard-openbsd-5c9e55858557a0b2f057780c947883b34155cd7b.tar.xz
wireguard-openbsd-5c9e55858557a0b2f057780c947883b34155cd7b.zip
errno -> err in a structure. OK deraadt@
Diffstat (limited to 'lib/libc/stdlib/strtonum.c')
-rw-r--r--lib/libc/stdlib/strtonum.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/stdlib/strtonum.c b/lib/libc/stdlib/strtonum.c
index a7f07c9062c..a656b63f19e 100644
--- a/lib/libc/stdlib/strtonum.c
+++ b/lib/libc/stdlib/strtonum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strtonum.c,v 1.2 2004/05/03 20:53:34 millert Exp $ */
+/* $OpenBSD: strtonum.c,v 1.3 2004/06/21 23:12:25 marc Exp $ */
/*
* Copyright (c) 2004 Ted Unangst and Todd Miller
* All rights reserved.
@@ -33,7 +33,7 @@ strtonum(const char *numstr, long long minval, unsigned long long maxval,
int error;
struct errval {
const char *errstr;
- int errno;
+ int err;
} ev[4] = {
{ NULL, 0 },
{ "invalid", EINVAL },
@@ -41,7 +41,7 @@ strtonum(const char *numstr, long long minval, unsigned long long maxval,
{ "too large", ERANGE },
};
- ev[0].errno = errno;
+ ev[0].err = errno;
errno = 0;
error = 0;
ull = 0;
@@ -66,7 +66,7 @@ strtonum(const char *numstr, long long minval, unsigned long long maxval,
}
if (errstrp != NULL)
*errstrp = ev[error].errstr;
- errno = ev[error].errno;
+ errno = ev[error].err;
if (error)
ull = 0;