mirror of
https://github.com/fluencelabs/redis
synced 2025-06-19 04:01:22 +00:00
Utils: Include stdint.h and fix signess in sdigits10().
This commit is contained in:
@ -256,7 +256,7 @@ uint32_t sdigits10(int64_t v) {
|
||||
if (v < 0) {
|
||||
/* Abs value of LLONG_MIN requires special handling. */
|
||||
uint64_t uv = (v != LLONG_MIN) ?
|
||||
-v : ((uint64_t) LLONG_MAX)+1;
|
||||
(uint64_t)-v : ((uint64_t) LLONG_MAX)+1;
|
||||
return digits10(uv)+1; /* +1 for the minus. */
|
||||
} else {
|
||||
return digits10(v);
|
||||
|
Reference in New Issue
Block a user