[PATCH 2/5] xfree86: use xf86AddNewOption instead of xf86addNewOption

Peter Hutterer peter.hutterer at who-t.net
Wed Aug 10 20:03:11 PDT 2011


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 at who-t.net>
---
 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 25755fd..b831d9a 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1237,8 +1237,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);
 	}
     }
@@ -1327,8 +1327,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);
 	}
     }
-- 
1.7.6



More information about the xorg-devel mailing list