LibC: Use the templated type consistently in strtol_impl<T>

This commit is contained in:
Andreas Kling 2020-01-18 11:41:04 +01:00
commit 545e2ba065
Notes: sideshowbarker 2024-07-19 09:59:06 +09:00

View file

@ -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); 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; bool has_overflowed = false;
unsigned digits_consumed = 0; unsigned digits_consumed = 0;