Skip to content

Commit e767e59

Browse files
committed
when reading unsigned from redis, use strtoul because otherwise we lose data
1 parent 19a39ec commit e767e59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

daemon/redis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ static struct timeval strtotimeval(const char *c, char **endp, int base) {
873873
define_get_int_type(time_t, time_t, strtoull);
874874
define_get_int_type(timeval, struct timeval, strtotimeval);
875875
define_get_int_type(int, int, strtol);
876-
define_get_int_type(unsigned, unsigned int, strtol);
876+
define_get_int_type(unsigned, unsigned int, strtoul);
877877
//define_get_int_type(u16, u_int16_t, strtol);
878878
//define_get_int_type(u64, u_int64_t, strtoull);
879879
define_get_int_type(a64, atomic64, strtoa64);

0 commit comments

Comments
 (0)