[PATCH 3/7] input: un-constify InputAttributes

Hans de Goede hdegoede at redhat.com
Thu Jan 30 05:57:23 PST 2014


Hi,

On 01/30/2014 02:54 PM, Hans de Goede wrote:
> Hi,
> 
> On 01/30/2014 02:26 PM, Julien Cristau wrote:
>> On Thu, Jan 30, 2014 at 09:43:37 +0100, Hans de Goede wrote:
>>
>>> Hi,
>>>
>>> On 01/30/2014 12:51 AM, Peter Hutterer wrote:
>>>> Introduced in fecc7eb1cf66db64728ee2d68cd9443df7e70879 and reverts most of
>>>> that but it's helpfully mixed with other stuff.
>>>>
>>>> InputAttributes are not const, they're strdup'd everywhere but the test code
>>>> and freed properly. Revert the const char changes and fix the test up instead.
>>>>
>>>> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
>>>
>>> Please use XNFstrdup instead of strdup (or add explicit error checking)
>>> with that changed:
>>>
>> AFAICT the only strdups Peter adds are in the test code.  I don't think
>> it matters there.
> 
> Look closer, he also adds strdup calls to the new XkbInitRules function in
> xkb/xkbInit.c .

Oops correction I should look closer myself, that is in 2/7 not 3/7 . Anyways
I still believe that using XNFstrdup instead would be better. I don't see why
sloppy coding (lacking error checking is sloppy coding) would be ok in test
cases.

Regards,

Hans


More information about the xorg-devel mailing list