mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-25 10:40:25 +00:00
dix: simplify PolyText(), ProcImageText8(), ProcImageText16()
Don't need to store and branch on error value, just return it. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
53bae08ed0
commit
7319dc09eb
@@ -2380,8 +2380,6 @@ ProcGetImage(ClientPtr client)
|
||||
int
|
||||
ProcPolyText(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
|
||||
REQUEST(xPolyTextReq);
|
||||
DrawablePtr pDraw;
|
||||
GCPtr pGC;
|
||||
@@ -2389,24 +2387,17 @@ ProcPolyText(ClientPtr client)
|
||||
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
|
||||
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
|
||||
|
||||
err = PolyText(client,
|
||||
return PolyText(client,
|
||||
pDraw,
|
||||
pGC,
|
||||
(unsigned char *) &stuff[1],
|
||||
((unsigned char *) stuff) + (client->req_len << 2),
|
||||
stuff->x, stuff->y, stuff->reqType, stuff->drawable);
|
||||
|
||||
if (err == Success) {
|
||||
return Success;
|
||||
}
|
||||
else
|
||||
return err;
|
||||
}
|
||||
|
||||
int
|
||||
ProcImageText8(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
DrawablePtr pDraw;
|
||||
GCPtr pGC;
|
||||
|
||||
@@ -2415,24 +2406,17 @@ ProcImageText8(ClientPtr client)
|
||||
REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars);
|
||||
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
|
||||
|
||||
err = ImageText(client,
|
||||
return ImageText(client,
|
||||
pDraw,
|
||||
pGC,
|
||||
stuff->nChars,
|
||||
(unsigned char *) &stuff[1],
|
||||
stuff->x, stuff->y, stuff->reqType, stuff->drawable);
|
||||
|
||||
if (err == Success) {
|
||||
return Success;
|
||||
}
|
||||
else
|
||||
return err;
|
||||
}
|
||||
|
||||
int
|
||||
ProcImageText16(ClientPtr client)
|
||||
{
|
||||
int err;
|
||||
DrawablePtr pDraw;
|
||||
GCPtr pGC;
|
||||
|
||||
@@ -2441,18 +2425,12 @@ ProcImageText16(ClientPtr client)
|
||||
REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1);
|
||||
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
|
||||
|
||||
err = ImageText(client,
|
||||
return ImageText(client,
|
||||
pDraw,
|
||||
pGC,
|
||||
stuff->nChars,
|
||||
(unsigned char *) &stuff[1],
|
||||
stuff->x, stuff->y, stuff->reqType, stuff->drawable);
|
||||
|
||||
if (err == Success) {
|
||||
return Success;
|
||||
}
|
||||
else
|
||||
return err;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user