From 545e2ba065b7619f4ebfcdd9a0c6ed378c43eb1b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 18 Jan 2020 11:41:04 +0100 Subject: LibC: Use the templated type consistently in strtol_impl --- Libraries/LibC/stdlib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Libraries/LibC') diff --git a/Libraries/LibC/stdlib.cpp b/Libraries/LibC/stdlib.cpp index f67b87b9fa..43b6e83ba7 100644 --- a/Libraries/LibC/stdlib.cpp +++ b/Libraries/LibC/stdlib.cpp @@ -81,10 +81,10 @@ static inline T strtol_impl(const char* nptr, char** endptr, int base) } } - long cutoff_point = is_negative ? (min_value / base) : (max_value / base); + T cutoff_point = is_negative ? (min_value / base) : (max_value / base); int max_valid_digit_at_cutoff_point = is_negative ? (min_value % base) : (max_value % base); - long num = 0; + T num = 0; bool has_overflowed = false; unsigned digits_consumed = 0; -- cgit v1.2.3