xfree86: use xf86AddNewOption instead of xf86addNewOption
The former strdups for us. If the strdup fails we miss out on the CorePointer option (default on anyway) and we're likely to fall over soon anyway, so let's pretend this is the same behaviour. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
c39c8d3428
commit
aeab26e9e1
|
@ -1194,8 +1194,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
|||
if (Pointer)
|
||||
foundPointer = configInput(Pointer, confInput, from);
|
||||
if (foundPointer) {
|
||||
Pointer->options = xf86addNewOption(Pointer->options,
|
||||
xnfstrdup("CorePointer"), "on");
|
||||
Pointer->options = xf86AddNewOption(Pointer->options,
|
||||
"CorePointer", "on");
|
||||
servlayoutp->inputs = addDevice(servlayoutp->inputs, Pointer);
|
||||
}
|
||||
}
|
||||
|
@ -1284,8 +1284,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
|||
if (Keyboard)
|
||||
foundKeyboard = configInput(Keyboard, confInput, from);
|
||||
if (foundKeyboard) {
|
||||
Keyboard->options = xf86addNewOption(Keyboard->options,
|
||||
xnfstrdup("CoreKeyboard"), "on");
|
||||
Keyboard->options = xf86AddNewOption(Keyboard->options,
|
||||
"CoreKeyboard", "on");
|
||||
servlayoutp->inputs = addDevice(servlayoutp->inputs, Keyboard);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user