aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-11-29 16:13:30 +0100
committermarha <marha@users.sourceforge.net>2014-11-29 16:13:30 +0100
commit7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c (patch)
treee5b941fdff86328a065c46582ba53e0cc73c8576 /xorg-server/os
parent0dbe845b2f4ba08924d6fcb9634d09dc3dde13d6 (diff)
parenta1011d63ffb5cc4f41bf0f4622ee3f1493d419d9 (diff)
downloadvcxsrv-7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c.tar.gz
vcxsrv-7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c.tar.bz2
vcxsrv-7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/dix/dispatch.c xorg-server/hw/xwin/ddraw.h xorg-server/hw/xwin/glx/glshim.c xorg-server/hw/xwin/winclipboard/xevents.c xorg-server/hw/xwin/windialogs.c xorg-server/hw/xwin/winmultiwindowshape.c xorg-server/hw/xwin/winmultiwindowwindow.c xorg-server/hw/xwin/winprefslex.l xorg-server/hw/xwin/winshadddnl.c xorg-server/hw/xwin/winshadgdi.c xorg-server/hw/xwin/winwndproc.c xorg-server/mi/miarc.c xorg-server/os/connection.c
Diffstat (limited to 'xorg-server/os')
-rw-r--r--xorg-server/os/WaitFor.c18
-rw-r--r--xorg-server/os/access.c58
-rw-r--r--xorg-server/os/busfault.c2
-rwxr-xr-x[-rw-r--r--]xorg-server/os/connection.c18
-rw-r--r--xorg-server/os/io.c10
-rw-r--r--xorg-server/os/log.c2
-rw-r--r--xorg-server/os/oscolor.c8
-rw-r--r--xorg-server/os/osdep.h8
-rw-r--r--xorg-server/os/osinit.c14
-rw-r--r--xorg-server/os/xdmcp.c2
10 files changed, 70 insertions, 70 deletions
diff --git a/xorg-server/os/WaitFor.c b/xorg-server/os/WaitFor.c
index ffc896176..86c25e120 100644
--- a/xorg-server/os/WaitFor.c
+++ b/xorg-server/os/WaitFor.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -82,7 +82,7 @@ SOFTWARE.
#define EINVAL WSAEINVAL
#undef EBADF
#define EBADF WSAENOTSOCK
-/* Windows select does not set errno. Use GetErrno as wrapper for
+/* Windows select does not set errno. Use GetErrno as wrapper for
WSAGetLastError */
#define GetErrno WSAGetLastError
#else
@@ -167,7 +167,7 @@ WaitForSomething(int *pClientsReady)
busfault_check();
#endif
- /* We need a while loop here to handle
+ /* We need a while loop here to handle
crashed connections and the screen saver timeout */
while (1) {
/* deal with any blocked jobs */
@@ -349,14 +349,14 @@ WaitForSomething(int *pClientsReady)
* ready, they are all returned. This means that an
* aggressive client could take over the server.
* This was not considered a big problem because
- * aggressive clients can hose the server in so many
+ * aggressive clients can hose the server in so many
* other ways :)
*/
client_priority = clients[client_index]->priority;
if (nready == 0 || client_priority > highest_priority) {
/* Either we found the first client, or we found
* a client whose priority is greater than all others
- * that have been found so far. Either way, we want
+ * that have been found so far. Either way, we want
* to initialize the list of clients to contain just
* this client.
*/
@@ -364,7 +364,7 @@ WaitForSomething(int *pClientsReady)
highest_priority = client_priority;
nready = 1;
}
- /* the following if makes sure that multiple same-priority
+ /* the following if makes sure that multiple same-priority
* clients get batched together
*/
else if (client_priority == highest_priority) {
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c
index 0dda35bb5..1644e9565 100644
--- a/xorg-server/os/access.c
+++ b/xorg-server/os/access.c
@@ -35,13 +35,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -201,7 +201,7 @@ static Bool NewHost(int /*family */ ,
/etc/X<display>.hosts, we've added a requested field to the HOST struct,
and a LocalHostRequested variable. These default to FALSE, but are set
to TRUE in ResetHosts when reading in /etc/X<display>.hosts. They are
- checked in DisableLocalHost(), which is called to disable the default
+ checked in DisableLocalHost(), which is called to disable the default
local host entries when stronger authentication is turned on. */
typedef struct _host {
@@ -391,7 +391,7 @@ ifioctl(int fd, int cmd, char *arg)
/*
* DefineSelf (fd, protocol):
*
- * Define this host for access control. Find all the hosts the OS knows about
+ * Define this host for access control. Find all the hosts the OS knows about
* for this fd and add them to the selfhosts list.
*/
@@ -882,7 +882,7 @@ DefineSelf(int fd)
)
continue;
- /*
+ /*
* ignore 'localhost' entries as they're not useful
* on the other end of the wire
*/
@@ -1005,7 +1005,7 @@ ResetHosts(const char *display)
} saddr;
#endif
int family = 0;
- void *addr;
+ void *addr = NULL;
int len;
siTypesInitialize();
@@ -1103,8 +1103,8 @@ ResetHosts(const char *display)
len = a->ai_addrlen;
f = ConvertAddr(a->ai_addr, &len,
(void **) &addr);
- if ((family == f) ||
- ((family == FamilyWild) && (f != -1))) {
+ if (addr && ((family == f) ||
+ ((family == FamilyWild) && (f != -1)))) {
NewHost(f, addr, len, FALSE);
}
}
@@ -1185,7 +1185,7 @@ ComputeLocalClient(ClientPtr client)
/*
* Return the uid and all gids of a connected local client
* Allocates a LocalClientCredRec - caller must call FreeLocalClientCreds
- *
+ *
* Used by localuser & localgroup ServerInterpreted access control forms below
* Used by AuthAudit to log who local connections came from
*/
@@ -1212,8 +1212,8 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec ** lccp)
return -1;
ci = ((OsCommPtr) client->osPrivate)->trans_conn;
#if !(defined(sun) && defined(HAVE_GETPEERUCRED))
- /* Most implementations can only determine peer credentials for Unix
- * domain sockets - Solaris getpeerucred can work with a bit more, so
+ /* Most implementations can only determine peer credentials for Unix
+ * domain sockets - Solaris getpeerucred can work with a bit more, so
* we just let it tell us if the connection type is supported or not
*/
if (!_XSERVTransIsLocal(ci)) {
@@ -1378,7 +1378,7 @@ ForEachHostInFamily(int family, Bool (*func) (unsigned char *addr,
return FALSE;
}
-/* Add a host to the access control list. This is the internal interface
+/* Add a host to the access control list. This is the internal interface
* called when starting or resetting the server */
static Bool
NewHost(int family, const void *addr, int len, int addingLocalHosts)
@@ -1529,14 +1529,14 @@ CheckAddr(int family, const void *pAddr, unsigned length)
return len;
}
-/* Check if a host is not in the access control list.
+/* Check if a host is not in the access control list.
* Returns 1 if host is invalid, 0 if we've found it. */
int
InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client)
{
int family;
- void *addr;
+ void *addr = NULL;
register HOST *selfhost, *host;
if (!AccessEnabled) /* just let them in */
@@ -1547,7 +1547,7 @@ InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client)
if (family == FamilyLocal) {
if (!LocalHostEnabled) {
/*
- * check to see if any local address is enabled. This
+ * check to see if any local address is enabled. This
* implicitly enables local connections.
*/
for (selfhost = selfhosts; selfhost; selfhost = selfhost->next) {
@@ -1563,12 +1563,12 @@ InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client)
}
for (host = validhosts; host; host = host->next) {
if (host->family == FamilyServerInterpreted) {
- if (siAddrMatch(family, addr, len, host, client)) {
+ if (addr && siAddrMatch(family, addr, len, host, client)) {
return 0;
}
}
else {
- if (addrEqual(family, addr, len, host))
+ if (addr && addrEqual(family, addr, len, host))
return 0;
}
@@ -1651,7 +1651,7 @@ GetAccessControl(void)
* See xc/doc/specs/SIAddresses for formal definitions of each type.
*/
-/* These definitions and the siTypeAdd function could be exported in the
+/* These definitions and the siTypeAdd function could be exported in the
* future to enable loading additional host types, but that was not done for
* the initial implementation.
*/
@@ -1748,7 +1748,7 @@ siCheckAddr(const char *addrString, int length)
valueString = (const char *) memchr(addrString, '\0', length);
if (valueString != NULL) {
/* Make sure the first string is a recognized address type,
- * and the second string is a valid address of that type.
+ * and the second string is a valid address of that type.
*/
typelen = strlen(addrString) + 1;
addrlen = length - typelen;
@@ -1815,8 +1815,8 @@ siHostnameAddrMatch(int family, void *addr, int len,
{
Bool res = FALSE;
-/* Currently only supports checking against IPv4 & IPv6 connections, but
- * support for other address families, such as DECnet, could be added if
+/* Currently only supports checking against IPv4 & IPv6 connections, but
+ * support for other address families, such as DECnet, could be added if
* desired.
*/
#if defined(IPv6) && defined(AF_INET6)
@@ -1826,7 +1826,7 @@ siHostnameAddrMatch(int family, void *addr, int len,
struct addrinfo *a;
struct addrinfo hints;
int f, hostaddrlen;
- void *hostaddr;
+ void *hostaddr = NULL;
if (siAddrLen >= sizeof(hostname))
return FALSE;
@@ -1840,7 +1840,7 @@ siHostnameAddrMatch(int family, void *addr, int len,
for (a = addresses; a != NULL; a = a->ai_next) {
hostaddrlen = a->ai_addrlen;
f = ConvertAddr(a->ai_addr, &hostaddrlen, &hostaddr);
- if ((f == family) && (len == hostaddrlen) &&
+ if ((f == family) && (len == hostaddrlen) && hostaddr &&
(memcmp(addr, hostaddr, len) == 0)) {
res = TRUE;
break;
@@ -1898,7 +1898,7 @@ siHostnameCheckAddr(const char *valueString, int length, void *typePriv)
{
/* Check conformance of hostname to RFC 2396 sec. 3.2.2 definition.
* We do not use ctype functions here to avoid locale-specific
- * character sets. Hostnames must be pure ASCII.
+ * character sets. Hostnames must be pure ASCII.
*/
int len = length;
int i;
@@ -1952,12 +1952,12 @@ siHostnameCheckAddr(const char *valueString, int length, void *typePriv)
*
* Currently supports only IPv6 literal address as specified in IETF RFC 3513
*
- * Once draft-ietf-ipv6-scoping-arch-00.txt becomes an RFC, support will be
+ * Once draft-ietf-ipv6-scoping-arch-00.txt becomes an RFC, support will be
* added for the scoped address format it specifies.
*/
-/* Maximum length of an IPv6 address string - increase when adding support
- * for scoped address qualifiers. Includes room for trailing NUL byte.
+/* Maximum length of an IPv6 address string - increase when adding support
+ * for scoped address qualifiers. Includes room for trailing NUL byte.
*/
#define SI_IPv6_MAXLEN INET6_ADDRSTRLEN
diff --git a/xorg-server/os/busfault.c b/xorg-server/os/busfault.c
index ac0268fd5..d4afa6df3 100644
--- a/xorg-server/os/busfault.c
+++ b/xorg-server/os/busfault.c
@@ -47,7 +47,7 @@ struct busfault {
void *context;
};
-static Bool busfaulted;
+static Bool busfaulted;
static struct xorg_list busfaults;
struct busfault *
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index 616c201b5..2d9d74b66 100644..100755
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -26,13 +26,13 @@ Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -453,7 +453,7 @@ CreateWellKnownSockets(void)
}
else { /* -displayfd and no explicit display number */
Bool found = 0;
- for (i = 0; i < 65535 - X_TCP_PORT; i++) {
+ for (i = 0; i < 65536 - X_TCP_PORT; i++) {
if (TryCreateSocket(i, &partial) && ListenTransCount >= 1 && (PartialNetwork || !partial)) {
found = 1;
break;
@@ -685,8 +685,8 @@ AuthorizationIDOfClient(ClientPtr client)
* CARD8 byteOrder;
* BYTE pad;
* CARD16 majorVersion, minorVersion;
- * CARD16 nbytesAuthProto;
- * CARD16 nbytesAuthString;
+ * CARD16 nbytesAuthProto;
+ * CARD16 nbytesAuthString;
* } xConnClientPrefix;
*
* It is hoped that eventually one protocol will be agreed upon. In the
@@ -1011,7 +1011,7 @@ CloseDownFileDescriptor(OsCommPtr oc)
/*****************
* CheckConnections
- * Some connection has died, go find which one and shut it down
+ * Some connection has died, go find which one and shut it down
* The file descriptor has been closed, but is still in AllClients.
* If would truly be wonderful if select() would put the bogus
* file descriptors in the exception mask, but nooooo. So we have
@@ -1078,7 +1078,7 @@ CheckConnections(void)
/*****************
* CloseDownConnection
- * Delete client from AllClients and free resources
+ * Delete client from AllClients and free resources
*****************/
void
diff --git a/xorg-server/os/io.c b/xorg-server/os/io.c
index ae3a9a786..b95586be3 100644
--- a/xorg-server/os/io.c
+++ b/xorg-server/os/io.c
@@ -26,13 +26,13 @@ Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -448,7 +448,7 @@ ReadRequestFromClient(ClientPtr client)
* buffer beyond the request we're returning to the caller.
* If there is only a partial request, treat like buffer
* is empty so that select() will be called again and other clients
- * can get into the queue.
+ * can get into the queue.
*/
gotnow -= needed;
diff --git a/xorg-server/os/log.c b/xorg-server/os/log.c
index af6c285af..1e7cd26b9 100644
--- a/xorg-server/os/log.c
+++ b/xorg-server/os/log.c
@@ -133,7 +133,7 @@ static char __crashreporter_info_buff__[4096] = { 0 };
static const char *__crashreporter_info__ __attribute__ ((__used__)) =
&__crashreporter_info_buff__[0];
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
-// This is actually a toolchain requirement, but I'm not sure the correct check,
+// This is actually a toolchain requirement, but I'm not sure the correct check,
// but it should be fine to just only include it for Leopard and later. This line
// just tells the linker to never strip this symbol (such as for space optimization)
asm(".desc ___crashreporter_info__, 0x10");
diff --git a/xorg-server/os/oscolor.c b/xorg-server/os/oscolor.c
index a44ed3f18..017aab1f2 100644
--- a/xorg-server/os/oscolor.c
+++ b/xorg-server/os/oscolor.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/os/osdep.h b/xorg-server/os/osdep.h
index 0ccdb62ef..77a5b53ab 100644
--- a/xorg-server/os/osdep.h
+++ b/xorg-server/os/osdep.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/os/osinit.c b/xorg-server/os/osinit.c
index 4d48ea94e..ff0979ac8 100644
--- a/xorg-server/os/osinit.c
+++ b/xorg-server/os/osinit.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -225,9 +225,9 @@ OsInit(void)
fclose(stdin);
fclose(stdout);
# endif
- /*
- * If a write of zero bytes to stderr returns non-zero, i.e. -1,
- * then writing to stderr failed, and we'll write somewhere else
+ /*
+ * If a write of zero bytes to stderr returns non-zero, i.e. -1,
+ * then writing to stderr failed, and we'll write somewhere else
* instead. (Apparently this never happens in the Real World.)
*/
if (write(2, fname, 0) == -1) {
diff --git a/xorg-server/os/xdmcp.c b/xorg-server/os/xdmcp.c
index bc7dcb3df..6025be1cc 100644
--- a/xorg-server/os/xdmcp.c
+++ b/xorg-server/os/xdmcp.c
@@ -569,7 +569,7 @@ XdmcpRegisterDisplayClass(const char *name, int length)
DisplayClass.data[i] = (CARD8) name[i];
}
-/*
+/*
* initialize XDMCP; create the socket, compute the display
* number, set up the state machine
*/