diff options
author | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:43 -0500 |
---|---|---|
committer | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:43 -0500 |
commit | 7aeb5ac87c6105bd8fcc9b1fd12e37ba1550f587 (patch) | |
tree | cab8ef3e10d3a33a2033538b6088e107f0a86dcd /arch/common/users.h | |
parent | a9d469b1b48a8446dc9b9fd987b6af83a60ed796 (diff) |
Import Upstream version 0.4.2.2
Diffstat (limited to 'arch/common/users.h')
-rw-r--r-- | arch/common/users.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/common/users.h b/arch/common/users.h index 84cec9d9..fd8f7834 100644 --- a/arch/common/users.h +++ b/arch/common/users.h @@ -4,14 +4,7 @@ static gchar *sys_users = NULL, static gboolean remove_users(gpointer key, gpointer value, gpointer data) { - if (!strncmp((gchar *) key, "USER", 4)) { - /* - * g_free((gchar *) key); - * g_free((GtkTreeIter *) value); - */ - return TRUE; - } - return FALSE; + return g_str_has_prefix(key, "USER"); } static void @@ -52,9 +45,9 @@ scan_users_do(void) uid = atoi(tmp[2]); strend(tmp[4], ','); if (uid >= 1000 && uid <= 65530) { - human_users = g_strdup_printf("%s$%s$%s=%s\n", human_users, key, tmp[0], tmp[4]); + human_users = h_strdup_cprintf("$%s$%s=%s\n", human_users, key, tmp[0], tmp[4]); } else { - sys_users = g_strdup_printf("%s$%s$%s=%s\n", sys_users, key, tmp[0], tmp[4]); + sys_users = h_strdup_cprintf("$%s$%s=%s\n", sys_users, key, tmp[0], tmp[4]); } g_strfreev(tmp); |