1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Cast to size_t instead of int

len and *retlen are size_t since r22957
(commit:4de12b6ae9a7fc1e28ada4b62291a78f28ae7528).
This commit is contained in:
Nobuyoshi Nakada 2021-07-20 23:21:05 +09:00
parent 31144fe987
commit a4e39112a8
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

4
util.c
View file

@ -48,7 +48,7 @@ ruby_scan_oct(const char *start, size_t len, size_t *retlen)
retval <<= 3;
retval |= *s++ - '0';
}
*retlen = (int)(s - start); /* less than len */
*retlen = (size_t)(s - start);
return retval;
}
@ -69,7 +69,7 @@ ruby_scan_hex(const char *start, size_t len, size_t *retlen)
retval |= d;
s++;
}
*retlen = (int)(s - start); /* less than len */
*retlen = (size_t)(s - start);
return retval;
}