1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

Type-limits error in GC environment initialization

* libguile/gc-malloc.c (scm_gc_init_malloc): GUILE_INIT_MALLOC_LIMIT
  is cast to unsigned then tested as if it were still signed
This commit is contained in:
Michael Gran 2009-08-20 21:31:58 -07:00
parent 0193377d24
commit 68a30f5730

View file

@ -83,7 +83,7 @@ static int scm_i_minyield_malloc;
void
scm_gc_init_malloc (void)
{
scm_mtrigger = scm_getenv_int ("GUILE_INIT_MALLOC_LIMIT",
int mtrigger = scm_getenv_int ("GUILE_INIT_MALLOC_LIMIT",
SCM_DEFAULT_INIT_MALLOC_LIMIT);
scm_i_minyield_malloc = scm_getenv_int ("GUILE_MIN_YIELD_MALLOC",
SCM_DEFAULT_MALLOC_MINYIELD);
@ -93,8 +93,10 @@ scm_gc_init_malloc (void)
if (scm_i_minyield_malloc < 1)
scm_i_minyield_malloc = 1;
if (scm_mtrigger < 0)
if (mtrigger < 0)
scm_mtrigger = SCM_DEFAULT_INIT_MALLOC_LIMIT;
else
scm_mtrigger = mtrigger;
}