diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2022-12-20 11:40:16 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2023-01-06 11:59:37 +1000 |
commit | f69280ddcdd3115ee4717f22e85e0f43569b60dd (patch) | |
tree | 99b4cfa9eb197cf56303732c40b140a4d163211b /dix | |
parent | a8c2e60d8d979a31ff3bb54f1ea8a0b0e3580a5f (diff) | |
download | xserver-f69280ddcdd3115ee4717f22e85e0f43569b60dd.tar.gz |
dix: localize two variables
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/dispatch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c index c651c3d88..92be773e6 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3766,14 +3766,11 @@ int ProcEstablishConnection(ClientPtr client) { const char *reason; - char *auth_proto, *auth_string; xConnClientPrefix *prefix; REQUEST(xReq); prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq); - auth_proto = (char *) prefix + sz_xConnClientPrefix; - auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto); if ((client->req_len << 2) != sz_xReq + sz_xConnClientPrefix + pad_to_int32(prefix->nbytesAuthProto) + @@ -3782,12 +3779,15 @@ ProcEstablishConnection(ClientPtr client) else if ((prefix->majorVersion != X_PROTOCOL) || (prefix->minorVersion != X_PROTOCOL_REVISION)) reason = "Protocol version mismatch"; - else + else { + char *auth_proto = (char *) prefix + sz_xConnClientPrefix; + char *auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto); reason = ClientAuthorized(client, (unsigned short) prefix->nbytesAuthProto, auth_proto, (unsigned short) prefix->nbytesAuthString, auth_string); + } return (SendConnSetup(client, reason)); } |