From 889a25e4ccedb564bbb6dba613104a4ae13b99bd Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 5 Sep 2024 10:43:40 +0200 Subject: [PATCH] Xnest: explicit GC operation struct initialization Just doing array-like listing of the init values is error-prone: somebody might change the order in the struct and things will going wild. Better be explicit about which fields are assigned to which values. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/GC.c | 54 +++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c index 85808cc90..622a225fe 100644 --- a/hw/xnest/GC.c +++ b/hw/xnest/GC.c @@ -42,36 +42,36 @@ is" without express or implied warranty. DevPrivateKeyRec xnestGCPrivateKeyRec; static GCFuncs xnestFuncs = { - xnestValidateGC, - xnestChangeGC, - xnestCopyGC, - xnestDestroyGC, - xnestChangeClip, - xnestDestroyClip, - xnestCopyClip, + .ValidateGC = xnestValidateGC, + .ChangeGC = xnestChangeGC, + .CopyGC = xnestCopyGC, + .DestroyGC = xnestDestroyGC, + .ChangeClip = xnestChangeClip, + .DestroyClip = xnestDestroyClip, + .CopyClip = xnestCopyClip, }; static GCOps xnestOps = { - xnestFillSpans, - xnestSetSpans, - xnestPutImage, - xnestCopyArea, - xnestCopyPlane, - xnestPolyPoint, - xnestPolylines, - xnestPolySegment, - xnestPolyRectangle, - xnestPolyArc, - xnestFillPolygon, - xnestPolyFillRect, - xnestPolyFillArc, - xnestPolyText8, - xnestPolyText16, - xnestImageText8, - xnestImageText16, - xnestImageGlyphBlt, - xnestPolyGlyphBlt, - xnestPushPixels + .FillSpans = xnestFillSpans, + .SetSpans = xnestSetSpans, + .PutImage = xnestPutImage, + .CopyArea = xnestCopyArea, + .CopyPlane = xnestCopyPlane, + .PolyPoint = xnestPolyPoint, + .Polylines = xnestPolylines, + .PolySegment = xnestPolySegment, + .PolyRectangle = xnestPolyRectangle, + .PolyArc = xnestPolyArc, + .FillPolygon = xnestFillPolygon, + .PolyFillRect = xnestPolyFillRect, + .PolyFillArc = xnestPolyFillArc, + .PolyText8 = xnestPolyText8, + .PolyText16 = xnestPolyText16, + .ImageText8 = xnestImageText8, + .ImageText16 = xnestImageText16, + .ImageGlyphBlt = xnestImageGlyphBlt, + .PolyGlyphBlt = xnestPolyGlyphBlt, + .PushPixels = xnestPushPixels }; Bool