diff options
author | Andreas Kling <kling@serenityos.org> | 2020-01-18 11:41:04 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-01-18 11:41:04 +0100 |
commit | 545e2ba065b7619f4ebfcdd9a0c6ed378c43eb1b (patch) | |
tree | 586e1433e96b7467f276f9a1600460b4f593501c /Libraries/LibC | |
parent | b65572b3fef8b04074b5227daa567bb6e7e01ce4 (diff) | |
download | serenity-545e2ba065b7619f4ebfcdd9a0c6ed378c43eb1b.zip |
LibC: Use the templated type consistently in strtol_impl<T>
Diffstat (limited to 'Libraries/LibC')
-rw-r--r-- | Libraries/LibC/stdlib.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; |