diff options
Diffstat (limited to 'geometry.c')
-rw-r--r-- | geometry.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -291,10 +291,8 @@ FreeProperties(PropertyInfo * pi, GeometryInfo * info) } for (tmp = pi; tmp != NULL; tmp = next) { - if (tmp->name) - free(tmp->name); - if (tmp->value) - free(tmp->value); + free(tmp->name); + free(tmp->value); tmp->name = tmp->value = NULL; next = (PropertyInfo *) tmp->defs.next; free(tmp); @@ -676,8 +674,7 @@ InitGeometryInfo(GeometryInfo * info, unsigned fileID, unsigned merge) static void ClearGeometryInfo(GeometryInfo * info) { - if (info->name) - free(info->name); + free(info->name); info->name = NULL; if (info->props) FreeProperties(info->props, info); @@ -750,8 +747,7 @@ AddProperty(GeometryInfo * info, PropertyInfo * new) ACTION("Ignoring \"%s\", using \"%s\"\n", old->value, new->value); } - if (old->value) - free(old->value); + free(old->value); old->value = uStringDup(new->value); return True; } @@ -1352,8 +1348,7 @@ HandleIncludeGeometry(IncludeStmt * stmt, XkbDescPtr xkb, GeometryInfo * info, (*hndlr) (rtrn, xkb, MergeOverride, &included); if (stmt->stmt != NULL) { - if (included.name != NULL) - free(included.name); + free(included.name); included.name = stmt->stmt; stmt->stmt = NULL; } |