[PATCH 16/19] Use C99 designated initializers in dix registry

Alan Coopersmith alan.coopersmith at oracle.com
Sun Jun 24 10:25:23 PDT 2012


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 dix/registry.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/dix/registry.c b/dix/registry.c
index e9c19b0..bb60865 100644
--- a/dix/registry.c
+++ b/dix/registry.c
@@ -286,8 +286,6 @@ LookupResourceName(RESTYPE resource)
 void
 dixResetRegistry(void)
 {
-    ExtensionEntry extEntry;
-
     /* Free all memory */
     while (nmajor--) {
         while (nminor[nmajor])
@@ -336,9 +334,10 @@ dixResetRegistry(void)
     RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB");
 
     /* Add the core protocol */
-    memset(&extEntry, 0, sizeof(extEntry));
-    extEntry.name = CORE;
-    RegisterExtensionNames(&extEntry);
+    {
+        ExtensionEntry extEntry = { .name = CORE };
+        RegisterExtensionNames(&extEntry);
+    }
 }
 
 #endif                          /* XREGISTRY */
-- 
1.7.9.2



More information about the xorg-devel mailing list