Dave Airlie <airl...@gmail.com> writes:

> On 14 April 2015 at 00:07, Keith Packard <kei...@keithp.com> wrote:
>> Dave Airlie <airl...@gmail.com> writes:
>>
>>> +#define CONF_MAXGPUDEVICES 4
>>>  typedef struct {
>>>      GenericListRec list;
>>>      const char *scrn_identifier;
>>> @@ -276,6 +277,10 @@ typedef struct {
>>>      char *scrn_comment;
>>>      int scrn_virtualX, scrn_virtualY;
>>>      char *match_seat;
>>> +
>>> +    int num_gpu_devices;
>>> +    const char *scrn_gpu_device_str[CONF_MAXGPUDEVICES];
>>> +    XF86ConfDevicePtr scrn_gpu_devices[CONF_MAXGPUDEVICES];
>>
>> It seems like just using realloc would actually make this easier as you
>> wouldn't need to deal with checking for this limit?
>>
>> Hard limits are annoying anyways.
>>
>
> Well I mainly did this because that is what parser does everywhere it takes
> multiple values, it never seems to use realloc for anything like this.
>
> I'd prefer the parser code to be consistent rather than useful, since nobody
> likes to touch or maintain it, and coming back in a few years wondering
> why this is realloc based and the rest isn't could be confusing.

Yeah, match the existing syle, even if sub-optimal. Sounds good to me.

Reviewed-by: Keith Packard <kei...@keithp.com>

-- 
-keith

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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

Reply via email to