mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
(make_uvec): Use ((size_t)-1) instead of SIZE_MAX, for better
portability.
This commit is contained in:
parent
1dbd057054
commit
f64f0bfff4
1 changed files with 1 additions and 2 deletions
|
@ -331,13 +331,12 @@ uvec_free (SCM uvec)
|
|||
/* Utility procedures. */
|
||||
/* ================================================================ */
|
||||
|
||||
|
||||
/* Create a new, uninitialized homogeneous numeric vector of type TYPE
|
||||
with space for LEN elements. */
|
||||
inline static SCM
|
||||
make_uvec (const int pos, const char * func_name, int type, size_t len)
|
||||
{
|
||||
if (len > ((size_t) SIZE_MAX >> uvec_shifts[type]))
|
||||
if (len > (((size_t)-1) >> uvec_shifts[type]))
|
||||
{
|
||||
if(pos < 0)
|
||||
scm_out_of_range (func_name, scm_size2num (len));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue