mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-08 20:48:05 +02:00
no need to check argument for _XkbFree()
simplify code by removing unneeded checks Signed-off-by: walter harms <wharms@bfs.de>
This commit is contained in:
parent
d02c2466f6
commit
714921f041
1 changed files with 3 additions and 5 deletions
|
|
@ -216,24 +216,22 @@ XkbFreeNames(XkbDescPtr xkb, unsigned which, Bool freeMap)
|
|||
|
||||
type = map->types;
|
||||
for (i = 0; i < map->num_types; i++, type++) {
|
||||
if (type->level_names != NULL) {
|
||||
_XkbFree(type->level_names);
|
||||
type->level_names = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((which & XkbKeyNamesMask) && (names->keys != NULL)) {
|
||||
if (which & XkbKeyNamesMask) {
|
||||
_XkbFree(names->keys);
|
||||
names->keys = NULL;
|
||||
names->num_keys = 0;
|
||||
}
|
||||
if ((which & XkbKeyAliasesMask) && (names->key_aliases)) {
|
||||
if (which & XkbKeyAliasesMask) {
|
||||
_XkbFree(names->key_aliases);
|
||||
names->key_aliases = NULL;
|
||||
names->num_key_aliases = 0;
|
||||
}
|
||||
if ((which & XkbRGNamesMask) && (names->radio_groups)) {
|
||||
if (which & XkbRGNamesMask) {
|
||||
_XkbFree(names->radio_groups);
|
||||
names->radio_groups = NULL;
|
||||
names->num_rg = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue