From 75af06f5f8ffc41fabd100253aad222cb4ab8662 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 10 Dec 2022 13:44:17 -0800 Subject: Replace uCalloc() and uTypedCalloc() with direct calloc() calls All these wrappers did was mess with types. Signed-off-by: Alan Coopersmith --- keytypes.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'keytypes.c') diff --git a/keytypes.c b/keytypes.c index 79e09fc..a8aaadd 100644 --- a/keytypes.c +++ b/keytypes.c @@ -159,8 +159,8 @@ InitKeyTypesInfo(KeyTypesInfo * info, XkbDescPtr xkb, KeyTypesInfo * from) info->dflt = from->dflt; if (from->dflt.entries) { - info->dflt.entries = uTypedCalloc(from->dflt.szEntries, - XkbKTMapEntryRec); + info->dflt.entries = calloc(from->dflt.szEntries, + sizeof(XkbKTMapEntryRec)); if (info->dflt.entries) { unsigned sz = from->dflt.nEntries * sizeof(XkbKTMapEntryRec); @@ -169,7 +169,7 @@ InitKeyTypesInfo(KeyTypesInfo * info, XkbDescPtr xkb, KeyTypesInfo * from) } if (from->dflt.lvlNames) { - info->dflt.lvlNames = uTypedCalloc(from->dflt.szNames, Atom); + info->dflt.lvlNames = calloc(from->dflt.szNames, sizeof(Atom)); if (info->dflt.lvlNames) { unsigned sz = from->dflt.szNames * sizeof(Atom); @@ -512,7 +512,7 @@ NextMapEntry(KeyTypeInfo * type) { if (type->entries == NULL) { - type->entries = uTypedCalloc(2, XkbKTMapEntryRec); + type->entries = calloc(2, sizeof(XkbKTMapEntryRec)); if (type->entries == NULL) { ERROR("Couldn't allocate map entries for %s\n", TypeTxt(type)); @@ -1153,7 +1153,7 @@ CopyDefToKeyType(XkbDescPtr xkb, XkbKeyTypePtr type, KeyTypeInfo * def) type->map = def->entries; if (def->preserve) { - type->preserve = uTypedCalloc(type->map_count, XkbModsRec); + type->preserve = calloc(type->map_count, sizeof(XkbModsRec)); if (!type->preserve) { WARN("Couldn't allocate preserve array in CopyDefToKeyType\n"); @@ -1177,7 +1177,7 @@ CopyDefToKeyType(XkbDescPtr xkb, XkbKeyTypePtr type, KeyTypeInfo * def) type->name = (Atom) def->name; if (def->szNames > 0) { - type->level_names = uTypedCalloc(def->numLevels, Atom); + type->level_names = calloc(def->numLevels, sizeof(Atom)); /* assert def->szNames<=def->numLevels */ for (int i = 0; i < def->szNames; i++) -- cgit v1.2.3