summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/atoi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/atoi.c')
-rw-r--r--lib/libc/stdlib/atoi.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/libc/stdlib/atoi.c b/lib/libc/stdlib/atoi.c
index 8e98a96e7..17c91c1 100644
--- a/lib/libc/stdlib/atoi.c
+++ b/lib/libc/stdlib/atoi.c
@@ -37,17 +37,11 @@
static char sccsid[] = "@(#)atoi.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
-#include <errno.h>
#include <stdlib.h>
int
atoi(str)
const char *str;
{
- int r, saverr;
-
- saverr = errno;
- r = (int)strtol(str, (char **)NULL, 10);
- errno = saverr;
- return r;
+ return (int)strtol(str, (char **)NULL, 10);
}
OpenPOWER on IntegriCloud