From 2ac6a7f029d8855fbb4e8024aab0511727ac3a67 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 10 Dec 2022 14:10:32 -0800 Subject: Replace uFree() with direct free() calls All these wrappers did was mess with types and add a test for NULL pointers that isn't needed in C89 and later. Signed-off-by: Alan Coopersmith --- symbols.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'symbols.c') diff --git a/symbols.c b/symbols.c index 310ad07..75adbaf 100644 --- a/symbols.c +++ b/symbols.c @@ -124,10 +124,10 @@ FreeKeyInfo(KeyInfo * info) info->numLevels[i] = 0; info->types[i] = None; if (info->syms[i] != NULL) - uFree(info->syms[i]); + free(info->syms[i]); info->syms[i] = NULL; if (info->acts[i] != NULL) - uFree(info->acts[i]); + free(info->acts[i]); info->acts[i] = NULL; } info->dfltType = None; @@ -257,7 +257,7 @@ static void FreeSymbolsInfo(SymbolsInfo * info) { if (info->name) - uFree(info->name); + free(info->name); info->name = NULL; if (info->keys) { @@ -265,7 +265,7 @@ FreeSymbolsInfo(SymbolsInfo * info) { FreeKeyInfo(&info->keys[i]); } - uFree(info->keys); + free(info->keys); info->keys = NULL; } if (info->modMap) @@ -444,13 +444,13 @@ MergeKeyGroups(SymbolsInfo * info, } } if ((into->syms[group] != NULL) && (resultSyms != into->syms[group])) - uFree(into->syms[group]); + free(into->syms[group]); if ((from->syms[group] != NULL) && (resultSyms != from->syms[group])) - uFree(from->syms[group]); + free(from->syms[group]); if ((into->acts[group] != NULL) && (resultActs != into->acts[group])) - uFree(into->acts[group]); + free(into->acts[group]); if ((from->acts[group] != NULL) && (resultActs != from->acts[group])) - uFree(from->acts[group]); + free(from->acts[group]); into->numLevels[group] = resultWidth; into->syms[group] = resultSyms; from->syms[group] = NULL; @@ -476,9 +476,9 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from) if (into->numLevels[i] != 0) { if (into->syms[i]) - uFree(into->syms[i]); + free(into->syms[i]); if (into->acts[i]) - uFree(into->acts[i]); + free(into->acts[i]); } } *into = *from; @@ -740,7 +740,7 @@ MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from, if (!AddModMapEntry(into, mm)) into->errorCount++; next = (ModMapEntry *) mm->defs.next; - uFree(mm); + free(mm); } from->modMap = NULL; } @@ -788,7 +788,7 @@ HandleIncludeSymbols(IncludeStmt * stmt, if (stmt->stmt != NULL) { if (included.name != NULL) - uFree(included.name); + free(included.name); included.name = stmt->stmt; stmt->stmt = NULL; } @@ -1534,10 +1534,10 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key) { key->numLevels[i] = 0; if (key->syms[i] != NULL) - uFree(key->syms[i]); + free(key->syms[i]); key->syms[i] = (KeySym *) NULL; if (key->acts[i] != NULL) - uFree(key->acts[i]); + free(key->acts[i]); key->acts[i] = (XkbAction *) NULL; key->types[i] = (Atom) 0; } @@ -1924,10 +1924,10 @@ PrepareKeyDef(KeyInfo * key) { key->numLevels[i] = 0; if (key->syms[i] != NULL) - uFree(key->syms[i]); + free(key->syms[i]); key->syms[i] = (KeySym *) NULL; if (key->acts[i] != NULL) - uFree(key->acts[i]); + free(key->acts[i]); key->acts[i] = (XkbAction *) NULL; key->types[i] = (Atom) 0; } -- cgit v1.2.3