aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os
diff options
context:
space:
mode:
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
-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 3eb15b9b8..86d96c846 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 */
@@ -343,14 +343,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.
*/
@@ -358,7 +358,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 125f35f5f..5c510ded2 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 {
@@ -309,7 +309,7 @@ ifioctl(int fd, int cmd, char *arg)
/*
* DefineSelf (fd):
*
- * 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.
*/
@@ -712,7 +712,7 @@ DefineSelf(int fd)
)
continue;
- /*
+ /*
* ignore 'localhost' entries as they're not useful
* on the other end of the wire
*/
@@ -835,7 +835,7 @@ ResetHosts(const char *display)
} saddr;
#endif
int family = 0;
- void *addr;
+ void *addr = NULL;
int len;
siTypesInitialize();
@@ -928,8 +928,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);
}
}
@@ -1010,7 +1010,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
*/
@@ -1037,8 +1037,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)) {
@@ -1203,7 +1203,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)
@@ -1352,14 +1352,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 */
@@ -1370,7 +1370,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) {
@@ -1386,12 +1386,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;
}
@@ -1474,7 +1474,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.
*/
@@ -1571,7 +1571,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;
@@ -1638,8 +1638,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)
@@ -1648,7 +1648,7 @@ siHostnameAddrMatch(int family, void *addr, int len,
struct addrinfo *addresses;
struct addrinfo *a;
int f, hostaddrlen;
- void *hostaddr;
+ void *hostaddr = NULL;
if (siAddrLen >= sizeof(hostname))
return FALSE;
@@ -1659,7 +1659,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;
@@ -1717,7 +1717,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;
@@ -1771,12 +1771,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 f915e1295..da3397da6 100644
--- 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
@@ -421,7 +421,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) && !partial) {
found = 1;
break;
@@ -648,8 +648,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
@@ -974,7 +974,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
@@ -1035,7 +1035,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 8181a8639..bb273bb0c 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 7348ad4a2..2e3b3f61f 100644
--- a/xorg-server/os/log.c
+++ b/xorg-server/os/log.c
@@ -127,7 +127,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 99616d94b..b6e97c928 100644
--- a/xorg-server/os/xdmcp.c
+++ b/xorg-server/os/xdmcp.c
@@ -562,7 +562,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
*/