[PATCH 07/11] glx: Initialize all context fields together

Ian Romanick idr at freedesktop.org
Tue Apr 17 08:36:23 PDT 2012


On 04/17/2012 03:05 AM, Christopher James Halse Rogers wrote:
> On Fri, 2012-04-13 at 18:11 -0700, Ian Romanick wrote:
>>
>> @@ -292,26 +292,10 @@ DoCreateContext(__GLXclientState * cl,
>> GLXContextID gcId,
>>           return BadAlloc;
>>       }
>>
>> -    /*
>> -     ** Initially, setup the part of the context that could be used
>> by
>> -     ** a GL core that needs windowing information (e.g., Mesa).
>> +    /* Initialize the GLXcontext structure.
>>        */
>>       glxc->pGlxScreen = pGlxScreen;
>>       glxc->config = config;
>> -
>> -    /*
>> -     ** Register this context as a resource.
>> -     */
>> -    if (!AddResource(gcId, __glXContextRes, (pointer) glxc)) {
>> -        (*glxc->destroy) (glxc);
>> -        client->errorValue = gcId;
>> -        return BadAlloc;
>> -    }
>> -
>> -    /*
>> -     ** Finally, now that everything is working, setup the rest of
>> the
>> -     ** context.
>> -     */
>>       glxc->id = gcId;
>>       glxc->share_id = shareList;
>>       glxc->idExists = GL_TRUE;
>> @@ -319,6 +303,14 @@ DoCreateContext(__GLXclientState * cl,
>> GLXContextID gcId,
>>       glxc->isDirect = isDirect;
>>       glxc->renderMode = GL_RENDER;
>>
>> +    /* Register this context as a resource.
>> +     */
>> +    if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) {
>> +        (*glxc->destroy) (glxc);
>> +        client->errorValue = gcId;
>> +        return BadAlloc;
>> +    }
>> +
> ^^^ git am, being the pedant that it is, complains about this trailing
> whitespace.

Yikes!  My xserver tree seems to be the only place I *didn't* do 'chmod 
+x .git/hooks/pre-commit'.  Thanks for pointing this out.

Luckily, a later patch in the series deletes that line altogether.  I 
did, however, fix it in this patch.


More information about the xorg-devel mailing list