aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-29 14:09:52 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-05 08:11:42 +0200
commita8fd16ce61113f54391a2a58c9ad00466b67af98 (patch)
tree9298154b2a9deadd148583d00bfb8f8f213aaaf2
parent141316af0d45968b95c3fb5c08516dd6e93ac64e (diff)
downloadnx-libs-a8fd16ce61113f54391a2a58c9ad00466b67af98.tar.gz
nx-libs-a8fd16ce61113f54391a2a58c9ad00466b67af98.tar.bz2
nx-libs-a8fd16ce61113f54391a2a58c9ad00466b67af98.zip
Xserver/os/xdmauth.c: Avoid compiler warnings due to -Wswitch being enabled. Use if statement rather than switch.
Backported from X.org. Found in commit... commit 7deaaa797cf8e7ca71e9b34fa6f413d1ed2b3dab Author: Adam Jackson <ajax@nwnk.net> Date: Tue Mar 28 01:21:00 2006 +0000
-rw-r--r--nx-X11/programs/Xserver/os/xdmauth.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/os/xdmauth.c b/nx-X11/programs/Xserver/os/xdmauth.c
index a89c5b0c0..c2796fba1 100644
--- a/nx-X11/programs/Xserver/os/xdmauth.c
+++ b/nx-X11/programs/Xserver/os/xdmauth.c
@@ -70,9 +70,7 @@ XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData,
XdmcpUnwrap (incomingData->data, &privateKey,
incomingData->data,incomingData->length);
- switch (packet_type)
- {
- case ACCEPT:
+ if (packet_type == ACCEPT) {
if (incomingData->length != 8)
return FALSE;
incoming = (XdmAuthKeyPtr) incomingData->data;
@@ -88,9 +86,7 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData,
{
outgoingData->length = 0;
outgoingData->data = 0;
- switch (packet_type)
- {
- case REQUEST:
+ if (packet_type == REQUEST) {
if (XdmcpAllocARRAY8 (outgoingData, 8))
XdmcpWrap (&rho, &privateKey, outgoingData->data, 8);
}