declare gboolean vtable_set static.
[platform/upstream/glib.git] / glib / gmem.c
index 616614b..225c960 100644 (file)
@@ -224,11 +224,11 @@ fallback_calloc (gsize n_blocks,
 void
 g_mem_set_vtable (GMemVTable *vtable)
 {
-  gboolean vtable_set = FALSE;
+  static gboolean vtable_set = FALSE;
 
   if (!vtable_set)
     {
-      vtable_set |= TRUE;
+      vtable_set = TRUE;
       if (vtable->malloc && vtable->realloc && vtable->free)
        {
          glib_mem_vtable.malloc = vtable->malloc;