2009-10-06 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Tue, 6 Oct 2009 16:29:55 +0000 (16:29 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:49 +0000 (21:06 +0400)
* alloc.c (GC_try_to_collect_general): Change the type of "result"
local variable to GC_bool.

ChangeLog
alloc.c

index 5e24ab3..38121f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-10-06  Ivan Maidanski <ivmai@mail.ru>
 
+       * alloc.c (GC_try_to_collect_general): Change the type of "result"
+       local variable to GC_bool.
+
+2009-10-06  Ivan Maidanski <ivmai@mail.ru>
+
        * include/gc_config_macros.h: Use old behavior for FreeBSD and
        NetBSD platform detection code (check that other GC_xxx_THREADS
        are undefined); add FIXME.
diff --git a/alloc.c b/alloc.c
index a02f93b..9394dc9 100644 (file)
--- a/alloc.c
+++ b/alloc.c
@@ -912,7 +912,7 @@ STATIC void GC_finish_collection(void)
 STATIC GC_bool GC_try_to_collect_general(GC_stop_func stop_func,
                                          GC_bool force_unmap)
 {
-    int result;
+    GC_bool result;
 #   ifdef USE_MUNMAP
       int old_unmap_threshold;
 #   endif
@@ -934,14 +934,14 @@ STATIC GC_bool GC_try_to_collect_general(GC_stop_func stop_func,
     ENTER_GC();
     /* Minimize junk left in my registers */
       GC_noop(0,0,0,0,0,0);
-    result = (int)GC_try_to_collect_inner(stop_func);
+    result = GC_try_to_collect_inner(stop_func);
     EXIT_GC();
 #   ifdef USE_MUNMAP
       GC_unmap_threshold = old_unmap_threshold; /* restore */
 #   endif
     RESTORE_CANCEL(cancel_state);
     UNLOCK();
-    if(result) {
+    if (result) {
         if (GC_debugging_started) GC_print_all_smashed();
         GC_INVOKE_FINALIZERS();
     }