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/xquartz/quartz.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/xquartz/quartz.c')
-rw-r--r-- | hw/xquartz/quartz.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index bc6c8d048..d7229cecb 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -164,10 +164,7 @@ static const ExtensionModule quartzExtensions[] = { */ static void QuartzExtensionInit(void) { - int i; - - for (i = 0; i < ARRAY_SIZE(quartzExtensions); i++) - LoadExtension(&quartzExtensions[i], TRUE); + LoadExtensionList(quartzExtensions, ARRAY_SIZE(quartzExtensions), TRUE); } /* |