}
int get_keymaps(char ***ret) {
- _cleanup_set_free_free_ Set *keymaps = NULL;
+ _cleanup_set_free_ Set *keymaps = NULL;
_cleanup_strv_free_ char **keymap_dirs = NULL;
int r;
if (r < 0)
return r;
- keymaps = set_new(&string_hash_ops);
+ keymaps = set_new(&string_hash_ops_free);
if (!keymaps)
return -ENOMEM;
log_debug_errno(r, "Failed to read keymap list from %s, ignoring: %m", *dir);
}
- _cleanup_strv_free_ char **l = set_get_strv(keymaps);
+ _cleanup_strv_free_ char **l = set_to_strv(&keymaps);
if (!l)
return -ENOMEM;
- keymaps = set_free(keymaps); /* If we got the strv above, then do a set_free() rather than
- * set_free_free() since the entries of the set are now owned by the
- * strv */
-
if (strv_isempty(l))
return -ENOENT;