Hello gents,
Can someone take a look at this patch please. Keith already covered the
rest of the series but this patch went below his radar.
Thanks
Emil
On 05/02/14 16:20, Emil Velikov wrote:
> With all the logic now in place there is no need to allocate a separate
> ExtensionModule to be used as a sentinel.
>
> Signed-off-by: Emil Velikov
> ---
> mi/miinitext.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/mi/miinitext.c b/mi/miinitext.c
> index ce2e4bc..b136818 100644
> --- a/mi/miinitext.c
> +++ b/mi/miinitext.c
> @@ -331,7 +331,7 @@ InitExtensions(int argc, char *argv[])
>
> AddStaticExtensions();
>
> -for (i = 0; ExtensionModuleList[i].name != NULL; i++) {
> +for (i = 0; i < numExtensionModules; i++) {
> ext = &ExtensionModuleList[i];
> if (ext->initFunc != NULL &&
> (ext->disablePtr == NULL || !*ext->disablePtr)) {
> @@ -352,14 +352,13 @@ NewExtensionModule(void)
>
> n = numExtensionModules + 1;
> ExtensionModuleList = realloc(ExtensionModuleList,
> - (n + 1) * sizeof(ExtensionModule));
> + n * sizeof(ExtensionModule));
> if (ExtensionModuleList == NULL) {
> ExtensionModuleList = save;
> return NULL;
> }
> else {
> numExtensionModules++;
> -ExtensionModuleList[numExtensionModules].name = NULL;
> return ExtensionModuleList + (numExtensionModules - 1);
> }
> }
>
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel