From 7b92b22899a104039e232eaf2030e20e47ca1a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 1 Jun 2024 11:12:12 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20rely=20on=20integer=20wrapping?= =?UTF-8?q?=20in=20=E2=80=98scm=5Fgc=5Fregister=5Fallocation=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libguile/gc.c (scm_gc_register_allocation): Simplify condition. --- libguile/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libguile/gc.c b/libguile/gc.c index 7717e9bef..3cbe43ec5 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -1,4 +1,4 @@ -/* Copyright 1995-2003,2006,2008-2014,2016-2018,2020 +/* Copyright 1995-2003,2006,2008-2014,2016-2018,2020,2024 Free Software Foundation, Inc. This file is part of Guile. @@ -582,7 +582,7 @@ void scm_gc_register_allocation (size_t size) { scm_i_pthread_mutex_lock (&bytes_until_gc_lock); - if (bytes_until_gc - size > bytes_until_gc) + if (size > bytes_until_gc) { bytes_until_gc = GC_get_heap_size (); scm_i_pthread_mutex_unlock (&bytes_until_gc_lock);