On 10/19/11 20:05, Peter Hutterer wrote:
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<[email protected]>
---
hw/xfree86/common/xf86Config.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 5c46152..96e98c1 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -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);
}
}
I wish I could say I was shocked at how horrible this API design is, that
whether or not the "a" in add is uppercase determines if the arguments are
strdup'ed by the caller or the callee, but this is the xf86 ddx.
Reviewed-by: Alan Coopersmith <[email protected]>
--
-Alan Coopersmith- [email protected]
Oracle Solaris Platform Engineering: X Window System
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel