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 --- parseutils.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'parseutils.c') diff --git a/parseutils.c b/parseutils.c index 76876fb..3299245 100644 --- a/parseutils.c +++ b/parseutils.c @@ -528,7 +528,7 @@ KeyDeclMerge(KeyDef * into, KeyDef * from) into->expr = (ExprDef *) AppendStmt(&into->expr->common, &from->expr->common); from->expr = NULL; - uFree(from); + free(from); return into; } @@ -595,8 +595,8 @@ OverlayKeyCreate(char *under, char *over) }; strncpy(key->over, over, XkbKeyNameLength); strncpy(key->under, under, XkbKeyNameLength); - uFree(over); - uFree(under); + free(over); + free(under); } return key; } @@ -762,7 +762,7 @@ IncludeCreate(char *str, unsigned merge) if (first) first->stmt = stmt; else if (stmt) - uFree(stmt); + free(stmt); return first; BAIL: ERROR("Illegal include statement \"%s\"\n", stmt); @@ -771,19 +771,19 @@ IncludeCreate(char *str, unsigned merge) { incl = first->next; if (first->file) - uFree(first->file); + free(first->file); if (first->map) - uFree(first->map); + free(first->map); if (first->modifier) - uFree(first->modifier); + free(first->modifier); if (first->path) - uFree(first->path); + free(first->path); first->file = first->map = first->path = NULL; - uFree(first); + free(first); first = incl; } if (stmt) - uFree(stmt); + free(stmt); return NULL; } -- cgit v1.2.1