From 57aff88c7d0761e590806d07bee1c9410680c89f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 29 Apr 2009 01:04:37 -0400 Subject: Fix most remaining deprecated resource lookups. Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage. --- record/record.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'record') diff --git a/record/record.c b/record/record.c index f97626f73..cb7a6276c 100644 --- a/record/record.c +++ b/record/record.c @@ -127,11 +127,10 @@ static int numEnabledRCAPs; * returns an error. */ #define VERIFY_CONTEXT(_pContext, _contextid, _client) { \ - (_pContext) = (RecordContextPtr)LookupIDByType((_contextid), RTContext); \ - if (!(_pContext)) { \ - (_client)->errorValue = (_contextid); \ - return RecordErrorBase + XRecordBadContext; \ - } \ + int rc = dixLookupResourceByType((pointer *)&(_pContext), _contextid, \ + RTContext, _client, DixUseAccess); \ + if (rc != Success) \ + return (rc == BadValue) ? RecordErrorBase + XRecordBadContext : rc; \ } static int RecordDeleteContext( -- cgit v1.2.3