Comment some suspicious uses of static variables
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 29 Aug 2013 11:50:39 +0000 (12:50 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 30 Aug 2013 16:32:40 +0000 (17:32 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68610
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
dbus/dbus-sysdeps-unix.c
dbus/dbus-sysdeps-win.c

index 13e13ca..8ecbfd3 100644 (file)
@@ -3948,6 +3948,8 @@ _dbus_append_keyring_directory_for_credentials (DBusString      *directory,
       }
     else
       {
+        /* Not strictly thread-safe, but if we fail at thread-safety here,
+         * the worst that will happen is some extra warnings. */
         static dbus_bool_t already_warned = FALSE;
         if (!already_warned)
           {
index 2f5e51f..1039cc6 100644 (file)
@@ -3622,6 +3622,8 @@ _dbus_append_keyring_directory_for_credentials (DBusString      *directory,
       }
     else
       {
+        /* Not strictly thread-safe, but if we fail at thread-safety here,
+         * the worst that will happen is some extra warnings. */
         static dbus_bool_t already_warned = FALSE;
         if (!already_warned)
           {