[libc-commits] [libc] 51a523e - [libc] Use correct type for atol
Alex Brachet via libc-commits
libc-commits at lists.llvm.org
Mon Dec 12 21:38:34 PST 2022
Author: Alex Brachet
Date: 2022-12-13T05:38:09Z
New Revision: 51a523e32ffba68157ed732d39c59fcb2dbf6cbe
URL: https://github.com/llvm/llvm-project/commit/51a523e32ffba68157ed732d39c59fcb2dbf6cbe
DIFF: https://github.com/llvm/llvm-project/commit/51a523e32ffba68157ed732d39c59fcb2dbf6cbe.diff
LOG: [libc] Use correct type for atol
Added:
Modified:
libc/src/stdlib/atol.cpp
Removed:
################################################################################
diff --git a/libc/src/stdlib/atol.cpp b/libc/src/stdlib/atol.cpp
index 713ccfa4cff4f..d786845f55f9f 100644
--- a/libc/src/stdlib/atol.cpp
+++ b/libc/src/stdlib/atol.cpp
@@ -13,7 +13,7 @@
namespace __llvm_libc {
LLVM_LIBC_FUNCTION(long, atol, (const char *str)) {
- auto result = internal::strtointeger<int>(str, 10);
+ auto result = internal::strtointeger<long>(str, 10);
if (result.has_error())
errno = result.error;
More information about the libc-commits
mailing list