summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-06-06 20:45:53 -0700
committerKeith Packard <keithp@keithp.com>2010-06-06 21:24:04 -0700
commitbc26665661565918af484ccd17caad951010df60 (patch)
tree1f922d9d23c3b43974714c0df0715a467a231a5d /Xext
parentf03be727d647183a2176355ad0ac9a6735067be9 (diff)
Initialize private keys in test suite
Make sure all of the private keys used by the test code are initialized before being used. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Robert Hooker <sarvatt@ubuntu.com>
Diffstat (limited to 'Xext')
-rw-r--r--Xext/xtest.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 0a6b1c531..6ee8430e8 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -99,10 +99,16 @@ static DISPATCH_PROC(SProcXTestFakeInput);
static DISPATCH_PROC(SProcXTestGetVersion);
static DISPATCH_PROC(SProcXTestGrabControl);
+Bool
+XTestInitPrivates(void)
+{
+ return dixRegisterPrivateKey(&XTestDevicePrivateKeyRec, PRIVATE_DEVICE, 0);
+}
+
void
XTestExtensionInit(INITARGS)
{
- if (!dixRegisterPrivateKey(&XTestDevicePrivateKeyRec, PRIVATE_DEVICE, 0))
+ if (!XTestInitPrivates())
return;
AddExtension(XTestExtensionName, 0, 0,