miinitext: move AddStaticExtensions() to LoadExtension()
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 26 Sep 2013 19:08:16 +0000 (20:08 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sun, 23 Mar 2014 18:18:55 +0000 (18:18 +0000)
Separate the function from NewExtensionModule() as the former does
only memory reallocation. No functional change.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
mi/miinitext.c

index 67511b8..9d5125e 100644 (file)
@@ -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;