1
Fork 0
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:
Marius Vollmer 2004-11-04 15:22:02 +00:00
parent 1dbd057054
commit f64f0bfff4

View file

@ -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));