summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/atol.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-12-30 03:34:46 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-12-30 03:34:46 +0000
commitf7388e0d3854026958e676c31ab50dc06e797f08 (patch)
tree4aa0c4f3355219f0fd3e65a25e922b69f3f9523e /lib/libc/stdlib/atol.c
parent236f9adc7826e5c51300de4a7093082695ca0704 (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/atol.c')
-rw-r--r--lib/libc/stdlib/atol.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/libc/stdlib/atol.c b/lib/libc/stdlib/atol.c
index b85b8b2648da..d2e3c459dfa3 100644
--- a/lib/libc/stdlib/atol.c
+++ b/lib/libc/stdlib/atol.c
@@ -37,18 +37,11 @@
static char sccsid[] = "@(#)atol.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
-#include <errno.h>
#include <stdlib.h>
long
atol(str)
const char *str;
{
- long r;
- int saverr;
-
- saverr = errno;
- r = strtol(str, (char **)NULL, 10);
- errno = saverr;
- return r;
+ return strtol(str, (char **)NULL, 10);
}