From: Simon McVittie Date: Thu, 29 Aug 2013 11:50:39 +0000 (+0100) Subject: Comment some suspicious uses of static variables X-Git-Tag: dbus-1.7.6~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=53966707ae206dc42e3e2746d1a731c69c35a610;p=thirdparty%2Fdbus.git Comment some suspicious uses of static variables Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68610 Reviewed-by: Ralf Habacker --- diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 13e13ca13..8ecbfd366 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -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) { diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 2f5e51fe5..1039cc646 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -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) {