diff options
author | Thomas Haller <thaller@redhat.com> | 2015-01-06 11:45:14 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-01-12 12:10:03 +0100 |
commit | 22409e0481dcaf5a288ad73553cbef5e2da05207 (patch) | |
tree | 5974f31f86bdfd750f03740985b65660824f1a4b /src/nm-firewall-manager.c | |
parent | f4bf50bf4a19797df6db4f91813ea06fce9fbc02 (diff) | |
download | NetworkManager-22409e0481dcaf5a288ad73553cbef5e2da05207.tar.gz |
core: declare nm_firewall_manager_get() using NM_DEFINE_SINGLETON_GETTER()
Diffstat (limited to 'src/nm-firewall-manager.c')
-rw-r--r-- | src/nm-firewall-manager.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/nm-firewall-manager.c b/src/nm-firewall-manager.c index 59520b3b44..4d302e9d2f 100644 --- a/src/nm-firewall-manager.c +++ b/src/nm-firewall-manager.c @@ -337,18 +337,7 @@ name_owner_changed (NMDBusManager *dbus_mgr, /*******************************************************************/ -NMFirewallManager * -nm_firewall_manager_get (void) -{ - static NMFirewallManager *singleton = NULL; - - if (G_UNLIKELY (!singleton)) { - singleton = NM_FIREWALL_MANAGER (g_object_new (NM_TYPE_FIREWALL_MANAGER, NULL)); - g_assert (singleton); - } - - return singleton; -} +NM_DEFINE_SINGLETON_GETTER (NMFirewallManager, nm_firewall_manager_get, NM_TYPE_FIREWALL_MANAGER); static void nm_firewall_manager_init (NMFirewallManager * self) |