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:
parent
31144fe987
commit
a4e39112a8
1 changed files with 2 additions and 2 deletions
4
util.c
4
util.c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue