diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2013-09-26 20:28:37 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-03-25 16:00:17 -0700 |
commit | e46820fb897600800b5f3297a59039556774e9c5 (patch) | |
tree | 03d3719ce5082e13de2ff61111cb313f113c91b5 /hw/xfree86/common/xf86Extensions.c | |
parent | d415b9d69fdaab4ce3fc05d3d26b2d8413403aa4 (diff) |
miinitext: introduce LoadExtensionList() to replace over LoadExtension()
Looping around LoadExtension() meant that ExtensionModuleList was reallocated
on every extension. Using LoadExtensionList() we pass an array thus the
function can do the reallocation in one go, and then loop and setup the
ExtensionModuleList.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
v2: Update ephyr [Keith Packard]
v3: Eliminate const warnings in LoadExtensionList [Keith Packard]
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86/common/xf86Extensions.c')
-rw-r--r-- | hw/xfree86/common/xf86Extensions.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/xfree86/common/xf86Extensions.c b/hw/xfree86/common/xf86Extensions.c index c80de34e6..25b2bc3d0 100644 --- a/hw/xfree86/common/xf86Extensions.c +++ b/hw/xfree86/common/xf86Extensions.c @@ -132,10 +132,7 @@ load_extension_config(void) void xf86ExtensionInit(void) { - int i; - load_extension_config(); - for (i = 0; i < ARRAY_SIZE(extensionModules); i++) - LoadExtension(&extensionModules[i], TRUE); + LoadExtensionList(extensionModules, ARRAY_SIZE(extensionModules), TRUE); } |