summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-06 11:00:37 -0700
committerKeith Packard <keithp@keithp.com>2010-05-07 21:56:36 -0700
commit35761d5f811406bc0b6a68c1b02bdb699142745c (patch)
tree5286fcdbbc0fcf47f4c29ca55ee8f235bd4d23cb /Xext
parent2eab697adba4b1858a530750e9a35fba79a7bf26 (diff)
Introduce dixLookupFontable for "FONT or GC" parameters.
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'Xext')
-rw-r--r--Xext/xf86bigfont.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index a4eb3f659..68c5d5234 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -427,18 +427,8 @@ ProcXF86BigfontQueryFont(
return BadLength;
}
#endif
- client->errorValue = stuff->id; /* EITHER font or gc */
- dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT,
- client, DixGetAttrAccess);
- if (!pFont) {
- GC *pGC;
- dixLookupResourceByType((pointer *)&pGC, stuff->id, RT_GC,
- client, DixGetAttrAccess);
- if (!pGC)
- return BadFont; /* procotol spec says only error is BadFont */
-
- pFont = pGC->font;
- }
+ if (dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess) != Success)
+ return BadFont; /* procotol spec says only error is BadFont */
pmax = FONTINKMAX(pFont);
pmin = FONTINKMIN(pFont);