diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2016-11-02 21:18:12 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2016-11-02 21:18:12 +1300 |
commit | 73acddfda7721ea6039d81d0f6d477c03d11dfdc (patch) | |
tree | c538e412b7560dfa55c26959ff328bc54cb7e158 | |
parent | 0732143dd25f72b10b3a30d53fcd03acf580ff3c (diff) | |
download | lightdm-git-73acddfda7721ea6039d81d0f6d477c03d11dfdc.tar.gz |
Replace our hostname code with the GLib function
-rw-r--r-- | liblightdm-gobject/system.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/liblightdm-gobject/system.c b/liblightdm-gobject/system.c index 1a0e5b56..d1ee4cab 100644 --- a/liblightdm-gobject/system.c +++ b/liblightdm-gobject/system.c @@ -21,8 +21,6 @@ * Helper functions to get system information. */ -static gchar *hostname = NULL; - /** * lightdm_get_hostname: * @@ -31,12 +29,5 @@ static gchar *hostname = NULL; const gchar * lightdm_get_hostname (void) { - if (!hostname) - { - struct utsname info; - uname (&info); - hostname = g_strdup (info.nodename); - } - - return hostname; + return g_get_host_name (); } |