From bc26665661565918af484ccd17caad951010df60 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 6 Jun 2010 20:45:53 -0700 Subject: 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 Tested-by: Robert Hooker --- Xext/xtest.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Xext') 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, -- cgit v1.2.3