From c38552d115e3bc71ad6179a8ad0d68778e943793 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Sat, 24 Apr 2010 23:56:36 -0700 Subject: Add typed resource-lookup errors for non-core resource types. Signed-off-by: Jamey Sharp Reviewed-by: Adam Jackson --- damageext/damageext.c | 3 +-- damageext/damageextint.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'damageext') diff --git a/damageext/damageext.c b/damageext/damageext.c index d9234345b..e4eda5efc 100644 --- a/damageext/damageext.c +++ b/damageext/damageext.c @@ -29,7 +29,6 @@ static unsigned char DamageReqCode; static int DamageEventBase; -static int DamageErrorBase; static RESTYPE DamageExtType; static RESTYPE DamageExtWinType; @@ -515,8 +514,8 @@ DamageExtensionInit(void) { DamageReqCode = (unsigned char)extEntry->base; DamageEventBase = extEntry->eventBase; - DamageErrorBase = extEntry->errorBase; EventSwapVector[DamageEventBase + XDamageNotify] = (EventSwapPtr) SDamageNotifyEvent; + SetResourceTypeErrorValue(DamageExtType, extEntry->errorBase + BadDamage); } } diff --git a/damageext/damageextint.h b/damageext/damageextint.h index d40ba3e1c..a235cb908 100644 --- a/damageext/damageextint.h +++ b/damageext/damageextint.h @@ -62,7 +62,7 @@ typedef struct _DamageExt { int rc = dixLookupResourceByType((pointer *)&(pDamageExt), rid, \ DamageExtType, client, mode); \ if (rc != Success) \ - return (rc == BadValue) ? DamageErrorBase + BadDamage : rc; \ + return rc; \ } void -- cgit v1.2.3