[PATCH 1/5] miinitext: move AddStaticExtensions() to LoadExtension()

Emil Velikov emil.l.velikov at gmail.com
Wed Feb 5 08:20:13 PST 2014


Separate the function from NewExtensionModule() as the former does
only memory reallocation. No functional change.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 mi/miinitext.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mi/miinitext.c b/mi/miinitext.c
index 67511b8..9d5125e 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -346,10 +346,6 @@ NewExtensionModule(void)
     ExtensionModule *save = ExtensionModuleList;
     int n;
 
-    /* Make sure built-in extensions get added to the list before those
-     * in modules. */
-    AddStaticExtensions();
-
     /* Sanity check */
     if (!ExtensionModuleList)
         numExtensionModules = 0;
@@ -376,6 +372,10 @@ LoadExtension(const ExtensionModule * e, Bool builtin)
     if (e == NULL || e->name == NULL)
         return;
 
+    /* Make sure built-in extensions get added to the list before those
+     * in modules. */
+    AddStaticExtensions();
+
     if (!(newext = NewExtensionModule()))
         return;
 
-- 
1.8.5.2



More information about the xorg-devel mailing list