]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
dbus-memory: move variable only used on Windows into the conditional
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 14 Jul 2011 17:47:18 +0000 (18:47 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 5 Aug 2011 11:27:10 +0000 (12:27 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
dbus/dbus-memory.c

index ee40e82b149097f2b2307930eb55ac4622d860bf..c5f464137ee90a75555f55a14d245617956a5172 100644 (file)
@@ -233,7 +233,6 @@ _dbus_get_fail_alloc_failures (void)
 }
 
 #ifdef DBUS_BUILD_TESTS
-static dbus_bool_t called = 0;
 /**
  * Called when about to alloc some memory; if
  * it returns #TRUE, then the allocation should
@@ -248,6 +247,8 @@ _dbus_decrement_fail_alloc_counter (void)
   _dbus_initialize_malloc_debug ();
 #ifdef DBUS_WIN_FIXME
   {
+    static dbus_bool_t called = 0;
+
     if (!called)
       {
         _dbus_verbose("TODO: memory allocation testing errors disabled for now\n");