diff --git a/Xext/security.c b/Xext/security.c index 54a2b3e3f..ac762794a 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1122,11 +1122,11 @@ CALLBACK(SecurityClientStateCallback) switch (client->clientState) { case ClientStateInitial: - TRUSTLEVEL(serverClient) = XSecurityClientTrusted; - AUTHID(serverClient) = None; + TRUSTLEVEL(client) = XSecurityClientTrusted; + AUTHID(client) = None; break; - case ClientStateRunning: + case ClientStateRunning: { XID authId = AuthorizationIDOfClient(client); SecurityAuthorizationPtr pAuth; @@ -1146,8 +1146,8 @@ CALLBACK(SecurityClientStateCallback) } break; } - case ClientStateGone: - case ClientStateRetained: /* client disconnected */ + case ClientStateGone: + case ClientStateRetained: /* client disconnected */ { SecurityAuthorizationPtr pAuth; @@ -1167,7 +1167,7 @@ CALLBACK(SecurityClientStateCallback) } break; } - default: break; + default: break; } } /* SecurityClientStateCallback */ diff --git a/dix/dispatch.c b/dix/dispatch.c index 2e7fa79ab..d8e3ae79b 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3682,7 +3682,6 @@ extern unsigned totalClientSize; void InitClient(ClientPtr client, int i, pointer ospriv) { - bzero(client, totalClientSize); client->index = i; client->sequence = 0; client->clientAsMask = ((Mask)i) << CLIENTOFFSET; diff --git a/hw/kdrive/vesa/vbe.c b/hw/kdrive/vesa/vbe.c index 5fbd8abef..08f0b037c 100644 --- a/hw/kdrive/vesa/vbe.c +++ b/hw/kdrive/vesa/vbe.c @@ -101,7 +101,7 @@ VbeReportVib(Vm86InfoPtr vi, VbeInfoBlock *vib) } ErrorF(")\n"); ErrorF("DAC is %s, controller is %sVGA compatible%s\n", - (vib->Capabilities[0]&1)?"fixed":"switchable", + (vib->Capabilities[0]&1)?"switchable":"fixed", (vib->Capabilities[0]&2)?"not ":"", (vib->Capabilities[0]&3)?", RAMDAC causes snow":""); ErrorF("Total memory: %lu kilobytes\n", 64L*vib->TotalMemory); diff --git a/hw/kdrive/vesa/vm86.c b/hw/kdrive/vesa/vm86.c index c4aadbd85..d09a36dee 100644 --- a/hw/kdrive/vesa/vm86.c +++ b/hw/kdrive/vesa/vm86.c @@ -235,13 +235,9 @@ Vm86DoInterrupt(Vm86InfoPtr vi, int num) OsBlockSignals (); code = vm86_loop(vi); OsReleaseSignals (); - if(code < 0) { - ErrorF("vm86 failed (errno %d)\n", errno); + if(code != 0) return -1; - } else if(code != 0) { - ErrorF("vm86 returned 0x%04X\n", code); - return -1; - } else + else return 0; } @@ -269,14 +265,10 @@ Vm86DoPOST(Vm86InfoPtr vi) OsBlockSignals (); code = vm86_loop(vi); OsReleaseSignals (); - if(code < 0) { - ErrorF("vm86 failed (errno %d)\n", errno); + if(code != 0) return -1; - } else if(code != 0) { - ErrorF("vm86 returned 0x%04X\n", code); - return -1; - } else - return 0; + else + return 0; } #define DEBUG_VBE 0 @@ -573,8 +565,17 @@ vm86_loop(Vm86InfoPtr vi) Vm86Debug(vi); return -1; default: - ErrorF("Unexpected result code 0x%X from vm86\n", code); - Vm86Debug(vi); + if(code < 0) { + if(errno == ENOSYS) { + ErrorF("No vm86 support. Are you running on AMD64?\n"); + } else { + ErrorF("vm86 failed (errno = %d).\n", errno); + Vm86Debug(vi); + } + } else { + ErrorF("Unexpected result code 0x%X from vm86\n", code); + Vm86Debug(vi); + } return -1; } }