summaryrefslogtreecommitdiff
path: root/geometry.c
diff options
context:
space:
mode:
Diffstat (limited to 'geometry.c')
-rw-r--r--geometry.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/geometry.c b/geometry.c
index 46c84f0..49ed6dd 100644
--- a/geometry.c
+++ b/geometry.c
@@ -315,12 +315,14 @@ InitKeyInfo(KeyInfo * key, RowInfo * row, GeometryInfo * info)
else
{
bzero(key, sizeof(KeyInfo));
+ *key = (KeyInfo) {
+ .defs.defined = _GK_Default,
+ .defs.fileID = info->fileID,
+ .defs.merge = info->merge,
+ .defs.next = NULL,
+ .row = row
+ };
strcpy(key->name, "default");
- key->defs.defined = _GK_Default;
- key->defs.fileID = info->fileID;
- key->defs.merge = info->merge;
- key->defs.next = NULL;
- key->row = row;
}
return;
}
@@ -3660,14 +3662,15 @@ CompileGeometry(XkbFile * file, XkbFileInfo * result, unsigned merge)
if (info.errorCount == 0)
{
XkbGeometryPtr geom;
- XkbGeometrySizesRec sizes;
- bzero(&sizes, sizeof(sizes));
- sizes.which = XkbGeomAllMask;
- sizes.num_properties = info.nProps;
- sizes.num_colors = 8;
- sizes.num_shapes = info.nShapes;
- sizes.num_sections = info.nSections;
- sizes.num_doodads = info.nDoodads;
+ XkbGeometrySizesRec sizes = {
+ .which = XkbGeomAllMask,
+ .num_properties = info.nProps,
+ .num_colors = 8,
+ .num_shapes = info.nShapes,
+ .num_sections = info.nSections,
+ .num_doodads = info.nDoodads
+ };
+
if (XkbAllocGeometry(xkb, &sizes) != Success)
{
WSGO("Couldn't allocate GeometryRec\n");