On 05/12/2025 20:09, Heikki Linnakangas wrote:
On 04/12/2025 03:08, Chao Li wrote:
I guess this function doesn’t have to check “-“ by itself, it leads some edge-case not to be well handled, for example “-0” is still 0, not a negative value. We can use strtoll() convert input string to a singed long long, and check if value is negative.

True. I originally wrote this for the 64-bit variant which will be used in the 64-bit offsets patch. For that we can't use strtoll().

I think it's best to reject the "-0" case, so I kept the code so that it's rejected, and added a test for that.

Committed, thanks for the review!

- Heikki



Reply via email to