summaryrefslogtreecommitdiff
path: root/hw/dmx
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-10 20:22:05 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-13 17:14:07 -0700
commit92ed75ac59e2d3af149cddb962efd05fc8487750 (patch)
treec05f3b03627ebd67a921fcec5cef3655083bb345 /hw/dmx
parent11c69880c7c48ef9e755c4e09fadef7a629d7bc7 (diff)
Eliminate boilerplate around client->noClientException.
Just let Dispatch() check for a noClientException, rather than making every single dispatch procedure take care of it. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'hw/dmx')
-rw-r--r--hw/dmx/dmx.c28
-rw-r--r--hw/dmx/dmxfont.c2
2 files changed, 14 insertions, 16 deletions
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index 95e7adca9..5718b6a59 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -235,7 +235,7 @@ static int ProcDMXQueryVersion(ClientPtr client)
swapl(&rep.patchVersion, n);
}
WriteToClient(client, sizeof(xDMXQueryVersionReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXSync(ClientPtr client)
@@ -257,7 +257,7 @@ static int ProcDMXSync(ClientPtr client)
swapl(&rep.status, n);
}
WriteToClient(client, sizeof(xDMXSyncReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXForceWindowCreation(ClientPtr client)
@@ -326,7 +326,7 @@ static int ProcDMXGetScreenCount(ClientPtr client)
swapl(&rep.screenCount, n);
}
WriteToClient(client, sizeof(xDMXGetScreenCountReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXGetScreenAttributes(ClientPtr client)
@@ -384,7 +384,7 @@ static int ProcDMXGetScreenAttributes(ClientPtr client)
}
WriteToClient(client, sizeof(xDMXGetScreenAttributesReply), (char *)&rep);
if (length) WriteToClient(client, length, (char *)attr.displayName);
- return client->noClientException;
+ return Success;
}
static int ProcDMXChangeScreensAttributes(ClientPtr client)
@@ -457,7 +457,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client)
WriteToClient(client,
sizeof(xDMXChangeScreensAttributesReply),
(char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXAddScreen(ClientPtr client)
@@ -508,7 +508,7 @@ static int ProcDMXAddScreen(ClientPtr client)
WriteToClient(client,
sizeof(xDMXAddScreenReply),
(char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXRemoveScreen(ClientPtr client)
@@ -534,7 +534,7 @@ static int ProcDMXRemoveScreen(ClientPtr client)
WriteToClient(client,
sizeof(xDMXRemoveScreenReply),
(char *)&rep);
- return client->noClientException;
+ return Success;
}
@@ -678,7 +678,7 @@ static int ProcDMXGetWindowAttributes(ClientPtr client)
free(windows);
free(screens);
- return client->noClientException;
+ return Success;
}
static int ProcDMXGetDesktopAttributes(ClientPtr client)
@@ -709,7 +709,7 @@ static int ProcDMXGetDesktopAttributes(ClientPtr client)
swapl(&rep.shiftY, n);
}
WriteToClient(client, sizeof(xDMXGetDesktopAttributesReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXChangeDesktopAttributes(ClientPtr client)
@@ -752,7 +752,7 @@ static int ProcDMXChangeDesktopAttributes(ClientPtr client)
WriteToClient(client,
sizeof(xDMXChangeDesktopAttributesReply),
(char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXGetInputCount(ClientPtr client)
@@ -772,7 +772,7 @@ static int ProcDMXGetInputCount(ClientPtr client)
swapl(&rep.inputCount, n);
}
WriteToClient(client, sizeof(xDMXGetInputCountReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXGetInputAttributes(ClientPtr client)
@@ -810,7 +810,7 @@ static int ProcDMXGetInputAttributes(ClientPtr client)
}
WriteToClient(client, sizeof(xDMXGetInputAttributesReply), (char *)&rep);
if (length) WriteToClient(client, length, (char *)attr.name);
- return client->noClientException;
+ return Success;
}
static int ProcDMXAddInput(ClientPtr client)
@@ -861,7 +861,7 @@ static int ProcDMXAddInput(ClientPtr client)
swapl(&rep.physicalId, n);
}
WriteToClient(client, sizeof(xDMXAddInputReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXRemoveInput(ClientPtr client)
@@ -887,7 +887,7 @@ static int ProcDMXRemoveInput(ClientPtr client)
swapl(&rep.status, n);
}
WriteToClient(client, sizeof(xDMXRemoveInputReply), (char *)&rep);
- return client->noClientException;
+ return Success;
}
static int ProcDMXDispatch(ClientPtr client)
diff --git a/hw/dmx/dmxfont.c b/hw/dmx/dmxfont.c
index b6b2e3111..7a418c813 100644
--- a/hw/dmx/dmxfont.c
+++ b/hw/dmx/dmxfont.c
@@ -208,8 +208,6 @@ static int dmxProcSetFontPath(ClientPtr client)
/* Restore old fontpath in the DMX server */
SetFontPath(client, nOldPaths, oldFontPath);
client->errorValue = error;
- } else {
- result = client->noClientException;
}
}