[PATCH app-xdm 01/11] Fix whitespace issues as reported by git diff

Gaetan Nadon memsize at videotron.ca
Sun Aug 29 06:24:42 PDT 2010


Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 access.c   |   98 ++++++++++++++++++++++++++++++------------------------------
 auth.c     |   42 +++++++++++++-------------
 choose.c   |   19 +++++------
 chooser.c  |   63 +++++++++++++++++++-------------------
 dm.c       |   14 ++++----
 file.c     |   10 +++---
 policy.c   |    4 +-
 server.c   |   18 +++++-----
 session.c  |    8 ++--
 util.c     |    4 +-
 xdmcp.c    |   44 +++++++++++++-------------
 xdmshell.c |    1 -
 12 files changed, 161 insertions(+), 164 deletions(-)

diff --git a/access.c b/access.c
index 04e981b..eae5286 100644
--- a/access.c
+++ b/access.c
@@ -421,7 +421,7 @@ ReadDisplayEntry (FILE *file)
 tryagain:
     displayOrAlias = ReadWord (file, FALSE);
     if (!displayOrAlias)
-    	return NULL;
+	return NULL;
     d = (DisplayEntry *) malloc (sizeof (DisplayEntry));
     d->notAllowed = 0;
     d->notBroadcast = 0;
@@ -447,18 +447,18 @@ tryagain:
 	    d->notAllowed = 1;
 	    ++displayOrAlias;
 	}
-    	if (HasGlobCharacters (displayOrAlias))
-    	{
+	if (HasGlobCharacters (displayOrAlias))
+	{
 	    d->type = DISPLAY_PATTERN;
 	    d->entry.displayPattern = strdup (displayOrAlias);
 	    if (!d->entry.displayPattern)
 	    {
-	    	free ((char *) d);
-	    	return NULL;
+		free ((char *) d);
+		return NULL;
 	    }
-    	}
-    	else
-    	{
+	}
+	else
+	{
 	    void *addr = NULL;
 	    size_t addr_length = 0;
 	    int addrtype = 0;
@@ -501,12 +501,12 @@ tryagain:
 	    display = &d->entry.displayAddress;
 	    if (!XdmcpAllocARRAY8 (&display->clientAddress, addr_length))
 	    {
-	    	free ((char *) d);
+		free ((char *) d);
 # if defined(IPv6) && defined(AF_INET6)
 		if (ai)
 		    freeaddrinfo(ai);
 # endif
-	    	return NULL;
+		return NULL;
 	    }
 	    memmove( display->clientAddress.data, addr, addr_length);
 # if defined(IPv6) && defined(AF_INET6)
@@ -517,29 +517,29 @@ tryagain:
 	    {
 # ifdef AF_UNIX
 	    case AF_UNIX:
-	    	display->connectionType = FamilyLocal;
-	    	break;
+		display->connectionType = FamilyLocal;
+		break;
 # endif
 # ifdef AF_INET
 	    case AF_INET:
-	    	display->connectionType = FamilyInternet;
-	    	break;
+		display->connectionType = FamilyInternet;
+		break;
 # endif
 # if defined(IPv6) && defined(AF_INET6)
 	    case AF_INET6:
-	    	display->connectionType = FamilyInternet6;
-	    	break;
+		display->connectionType = FamilyInternet6;
+		break;
 # endif
 # ifdef AF_DECnet
 	    case AF_DECnet:
-	    	display->connectionType = FamilyDECnet;
-	    	break;
+		display->connectionType = FamilyDECnet;
+		break;
 # endif
 	    default:
-	    	display->connectionType = FamilyLocal;
-	    	break;
+		display->connectionType = FamilyLocal;
+		break;
 	    }
-    	}
+	}
     }
     prev = &d->hosts;
     while ((h = ReadHostEntry (file)))
@@ -590,8 +590,8 @@ ScanAccessDatabase (void)
     FreeAccessDatabase ();
     if (*accessFile)
     {
-    	datafile = fopen (accessFile, "r");
-    	if (!datafile)
+	datafile = fopen (accessFile, "r");
+	if (!datafile)
 	{
 	    LogError ("Cannot open access control file %s, no XDMCP reqeusts will be granted\n", accessFile);
 	    return 0;
@@ -743,26 +743,26 @@ int ForEachMatchingIndirectHost (
 
     for (d = database; d; d = d->next)
     {
-    	switch (d->type) {
-    	case DISPLAY_ALIAS:
+	switch (d->type) {
+	case DISPLAY_ALIAS:
 	case DISPLAY_LISTEN:
 	    continue;
-    	case DISPLAY_PATTERN:
+	case DISPLAY_PATTERN:
 	    if (!clientName)
 		clientName = NetworkAddressToHostname (connectionType,
 						       clientAddress);
 	    if (!patternMatch (clientName, d->entry.displayPattern))
 		continue;
 	    break;
-    	case DISPLAY_ADDRESS:
+	case DISPLAY_ADDRESS:
 	    if (d->entry.displayAddress.connectionType != connectionType ||
-	    	!XdmcpARRAY8Equal (&d->entry.displayAddress.clientAddress,
+		!XdmcpARRAY8Equal (&d->entry.displayAddress.clientAddress,
 				  clientAddress))
 	    {
 		continue;
 	    }
 	    break;
-    	}
+	}
 	if (!d->hosts)
 	    continue;
 	if (d->notAllowed)
@@ -798,26 +798,26 @@ int UseChooser (
 
     for (d = database; d; d = d->next)
     {
-    	switch (d->type) {
-    	case DISPLAY_ALIAS:
+	switch (d->type) {
+	case DISPLAY_ALIAS:
 	case DISPLAY_LISTEN:
 	    continue;
-    	case DISPLAY_PATTERN:
+	case DISPLAY_PATTERN:
 	    if (!clientName)
 		clientName = NetworkAddressToHostname (connectionType,
 						       clientAddress);
 	    if (!patternMatch (clientName, d->entry.displayPattern))
 		continue;
 	    break;
-    	case DISPLAY_ADDRESS:
+	case DISPLAY_ADDRESS:
 	    if (d->entry.displayAddress.connectionType != connectionType ||
-	    	!XdmcpARRAY8Equal (&d->entry.displayAddress.clientAddress,
+		!XdmcpARRAY8Equal (&d->entry.displayAddress.clientAddress,
 				  clientAddress))
 	    {
 		continue;
 	    }
 	    break;
-    	}
+	}
 	if (!d->hosts)
 	    continue;
 	if (d->notAllowed)
@@ -846,26 +846,26 @@ void ForEachChooserHost (
 
     for (d = database; d; d = d->next)
     {
-    	switch (d->type) {
-    	case DISPLAY_ALIAS:
+	switch (d->type) {
+	case DISPLAY_ALIAS:
 	case DISPLAY_LISTEN:
 	    continue;
-    	case DISPLAY_PATTERN:
+	case DISPLAY_PATTERN:
 	    if (!clientName)
 		clientName = NetworkAddressToHostname (connectionType,
 						       clientAddress);
 	    if (!patternMatch (clientName, d->entry.displayPattern))
 		continue;
 	    break;
-    	case DISPLAY_ADDRESS:
+	case DISPLAY_ADDRESS:
 	    if (d->entry.displayAddress.connectionType != connectionType ||
-	    	!XdmcpARRAY8Equal (&d->entry.displayAddress.clientAddress,
+		!XdmcpARRAY8Equal (&d->entry.displayAddress.clientAddress,
 				  clientAddress))
 	    {
 		continue;
 	    }
 	    break;
-    	}
+	}
 	if (!d->hosts)
 	    continue;
 	if (d->notAllowed)
@@ -906,26 +906,26 @@ int AcceptableDisplayAddress (
     {
 	if (d->hosts)
 	    continue;
-    	switch (d->type) {
-    	case DISPLAY_ALIAS:
-    	case DISPLAY_LISTEN:
+	switch (d->type) {
+	case DISPLAY_ALIAS:
+	case DISPLAY_LISTEN:
 	    continue;
-    	case DISPLAY_PATTERN:
+	case DISPLAY_PATTERN:
 	    if (!clientName)
 		clientName = NetworkAddressToHostname (connectionType,
 						       clientAddress);
 	    if (!patternMatch (clientName, d->entry.displayPattern))
 		continue;
 	    break;
-    	case DISPLAY_ADDRESS:
+	case DISPLAY_ADDRESS:
 	    if (d->entry.displayAddress.connectionType != connectionType ||
-	    	!XdmcpARRAY8Equal (&d->entry.displayAddress.clientAddress,
+		!XdmcpARRAY8Equal (&d->entry.displayAddress.clientAddress,
 				  clientAddress))
 	    {
 		continue;
 	    }
 	    break;
-    	}
+	}
 	break;
     }
     if (clientName)
@@ -945,7 +945,7 @@ void ForEachListenAddr (
 
     for (d = database; d != NULL ; d = d->next)
     {
-    	if (d->type == DISPLAY_LISTEN) {
+	if (d->type == DISPLAY_LISTEN) {
 	    listenFound = 1;
 	    h = d->hosts;
 	    if (h != NULL) {
diff --git a/auth.c b/auth.c
index 8e2c226..59434ec 100644
--- a/auth.c
+++ b/auth.c
@@ -118,9 +118,9 @@ struct AuthProtocol {
     void	    (*InitAuth)(unsigned short len, char *name);
     Xauth	    *(*GetAuth)(unsigned short len, char *name);
     void	    (*GetXdmcpAuth)(
-    			struct protoDisplay	*pdpy,
-    			unsigned short	authorizationNameLen,
-    			char		*authorizationName);
+			struct protoDisplay	*pdpy,
+			unsigned short	authorizationNameLen,
+			char		*authorizationName);
     int		    inited;
 };
 
@@ -191,7 +191,7 @@ GenerateAuthorization (unsigned short name_length, char *name)
 	{
 	    Debug ("Got %p (%d %*.*s) ", auth,
 		auth->name_length, auth->name_length,
- 		auth->name_length, auth->name);
+		auth->name_length, auth->name);
 	    for (i = 0; i < (int)auth->data_length; i++)
 		Debug (" %02x", auth->data[i] & 0xff);
 	    Debug ("\n");
@@ -240,7 +240,7 @@ SetProtoDisplayAuthorization (
 	if (auth)
 	    Debug ("Got %p (%d %*.*s)\n", auth,
 		auth->name_length, auth->name_length,
- 		auth->name_length, auth->name);
+		auth->name_length, auth->name);
 	else
 	    Debug ("Got (null)\n");
     }
@@ -417,7 +417,7 @@ SaveServerAuthorizations (
     }
     else
     {
-    	Debug ("File: %s auth: %p\n", d->authFile, auths);
+	Debug ("File: %s auth: %p\n", d->authFile, auths);
 	ret = TRUE;
 	if (count == 0)
 	{
@@ -461,7 +461,7 @@ SaveServerAuthorizations (
 		    err = errno;
 		    ret = FALSE;
 		}
-    	}
+	}
 	/*
 	 * XXX: This is not elegant, but stdio has no truncation function.
 	 */
@@ -727,9 +727,9 @@ checkEntry (Xauth *auth)
 	for (a = addrs; a; a = a->next) {
 		if (a->family == auth->family &&
 		    a->address_length == auth->address_length &&
- 		    binaryEqual (a->address, auth->address, auth->address_length) &&
+		    binaryEqual (a->address, auth->address, auth->address_length) &&
 		    a->number_length == auth->number_length &&
- 		    binaryEqual (a->number, auth->number, auth->number_length) &&
+		    binaryEqual (a->number, auth->number, auth->number_length) &&
 		    a->name_length == auth->name_length &&
 		    binaryEqual (a->name, auth->name, auth->name_length))
 		{
@@ -795,7 +795,7 @@ DefineLocal (FILE *file, Xauth *auth)
 	uname(&name);
 	snprintf(tmp_displayname, sizeof(tmp_displayname), "%s", name.nodename);
 	writeAddr (FamilyLocal, strlen (tmp_displayname), tmp_displayname,
-       		   file, auth);
+		   file, auth);
 
 	/*
 	 * If _XGetHostname() returned the same value as uname(), don't
@@ -1122,7 +1122,7 @@ DefineSelf (int fd, FILE *file, Xauth *auth)
 		continue;
 
 	    if (len == 0)
- 	    {
+	    {
 		Debug ("Skipping zero length address\n");
 		continue;
 	    }
@@ -1405,11 +1405,11 @@ SetUserAuthorization (struct display *d, struct verify_info *verify)
 		!strncmp (auths[i]->name, "MIT-MAGIC-COOKIE-1", 18))
 	    {
 		magicCookie = i;
-	    	if (d->displayType.location == Local)
-	    	    writeLocalAuth (new, auths[i], d->name);
+		if (d->displayType.location == Local)
+		    writeLocalAuth (new, auths[i], d->name);
 #ifdef XDMCP
-	    	else
-	    	    writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name);
+		else
+		    writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name);
 #endif
 		break;
 	    }
@@ -1426,11 +1426,11 @@ SetUserAuthorization (struct display *d, struct verify_info *verify)
 		if (auths[i]->name_length == 14 &&
 		    !strncmp (auths[i]->name, "MIT-KERBEROS-5", 14))
 		    auths[i]->data_length = 0;
-	    	if (d->displayType.location == Local)
-	    	    writeLocalAuth (new, auths[i], d->name);
+		if (d->displayType.location == Local)
+		    writeLocalAuth (new, auths[i], d->name);
 #ifdef XDMCP
-	    	else
-	    	    writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name);
+		else
+		    writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name);
 #endif
 		auths[i]->data_length = data_len;
 	    }
@@ -1513,10 +1513,10 @@ RemoveUserAuthorization (struct display *d, struct verify_info *verify)
 	for (i = 0; i < d->authNum; i++)
 	{
 	    if (d->displayType.location == Local)
-	    	writeLocalAuth (new, auths[i], d->name);
+		writeLocalAuth (new, auths[i], d->name);
 #ifdef XDMCP
 	    else
-	    	writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name);
+		writeRemoteAuth (new, auths[i], d->peer, d->peerlen, d->name);
 #endif
 	}
 	doWrite = 1;
diff --git a/choose.c b/choose.c
index 5d5dc6d..1e61047 100644
--- a/choose.c
+++ b/choose.c
@@ -273,8 +273,8 @@ IndirectChoice (
 	else
 	{
 	    if (XdmcpARRAY8Equal (clientAddress, &c->client) &&
-	    	connectionType == c->connectionType)
-	    	return &c->choice;
+		connectionType == c->connectionType)
+		return &c->choice;
 	    prev = c;
 	}
     }
@@ -316,11 +316,11 @@ RegisterIndirectChoice (
 	if (!c)
 	    return 0;
 	c->connectionType = connectionType;
-    	if (!XdmcpCopyARRAY8 (clientAddress, &c->client))
-    	{
+	if (!XdmcpCopyARRAY8 (clientAddress, &c->client))
+	{
 	    free ((char *) c);
 	    return 0;
-    	}
+	}
     }
     else
     {
@@ -473,10 +473,10 @@ ProcessChooserSocket (int fd)
     Debug ("Read returns %d\n", len);
     if (len > 0)
     {
-    	buffer.data = (BYTE *) buf;
-    	buffer.size = sizeof (buf);
-    	buffer.count = len;
-    	buffer.pointer = 0;
+	buffer.data = (BYTE *) buf;
+	buffer.size = sizeof (buf);
+	buffer.count = len;
+	buffer.pointer = 0;
 	if (XdmcpReadARRAY8 (&buffer, &clientAddress)) {
 	    if (XdmcpReadCARD16 (&buffer, &connectionType)) {
 		if (XdmcpReadARRAY8 (&buffer, &choice)) {
@@ -542,4 +542,3 @@ RunChooser (struct display *d)
 }
 
 #endif /* XDMCP */
-
diff --git a/chooser.c b/chooser.c
index a688848..1e59a11 100644
--- a/chooser.c
+++ b/chooser.c
@@ -360,7 +360,7 @@ AddHostname (ARRAY8Ptr hostname, ARRAY8Ptr status, struct sockaddr *addr, int wi
     if (!*names)
     {
 	new = (HostName *) malloc (sizeof (HostName));
-    	if (!new)
+	if (!new)
 	    return 0;
 	if (hostname->length)
 	{
@@ -370,33 +370,33 @@ AddHostname (ARRAY8Ptr hostname, ARRAY8Ptr status, struct sockaddr *addr, int wi
 #if defined(IPv6) && defined(AF_INET6)
 	    case AF_INET6:
 #endif
-	    	{
-	    	    struct hostent  *hostent;
+		{
+		    struct hostent  *hostent;
 		    char	    *host;
 
-	    	    hostent = gethostbyaddr ((char *)hostAddr.data, hostAddr.length, addr->sa_family);
-	    	    if (hostent)
-	    	    {
+		    hostent = gethostbyaddr ((char *)hostAddr.data, hostAddr.length, addr->sa_family);
+		    if (hostent)
+		    {
 			XdmcpDisposeARRAY8 (hostname);
-		    	host = (char *)hostent->h_name;
+			host = (char *)hostent->h_name;
 			XdmcpAllocARRAY8 (hostname, strlen (host));
 			memmove( hostname->data, host, hostname->length);
-	    	    }
-	    	}
+		    }
+		}
 	    }
 	}
-    	if (!XdmcpAllocARRAY8 (&new->hostaddr, hostAddr.length))
-    	{
+	if (!XdmcpAllocARRAY8 (&new->hostaddr, hostAddr.length))
+	{
 	    free ((char *) new->fullname);
 	    free ((char *) new);
 	    return 0;
-    	}
-    	memmove( new->hostaddr.data, hostAddr.data, hostAddr.length);
+	}
+	memmove( new->hostaddr.data, hostAddr.data, hostAddr.length);
 	new->connectionType = connectionType;
 	new->hostname = *hostname;
 
-    	*names = new;
-    	new->next = NULL;
+	*names = new;
+	new->next = NULL;
 	NameTableSize++;
     }
     else
@@ -502,40 +502,40 @@ ReceivePacket (XtPointer closure, int *source, XtInputId *id)
 	return;
     switch (header.opcode) {
     case WILLING:
-    	if (XdmcpReadARRAY8 (&buffer, &authenticationName) &&
+	if (XdmcpReadARRAY8 (&buffer, &authenticationName) &&
 	    XdmcpReadARRAY8 (&buffer, &hostname) &&
 	    XdmcpReadARRAY8 (&buffer, &status))
-    	{
+	{
 	    if (header.length == 6 + authenticationName.length +
-	    	hostname.length + status.length)
+		hostname.length + status.length)
 	    {
 		if (AddHostname (&hostname, &status, (struct sockaddr *) &addr,
-		  		 header.opcode == (int) WILLING))
+				 header.opcode == (int) WILLING))
 		    saveHostname = 1;
 	    }
-    	}
+	}
 	XdmcpDisposeARRAY8 (&authenticationName);
 	break;
     case UNWILLING:
-    	if (XdmcpReadARRAY8 (&buffer, &hostname) &&
+	if (XdmcpReadARRAY8 (&buffer, &hostname) &&
 	    XdmcpReadARRAY8 (&buffer, &status))
-    	{
+	{
 	    if (header.length == 4 + hostname.length + status.length)
 	    {
 		if (AddHostname (&hostname, &status, (struct sockaddr *) &addr,
-		  		 header.opcode == (int) WILLING))
+				 header.opcode == (int) WILLING))
 		    saveHostname = 1;
 
 	    }
-    	}
+	}
 	break;
     default:
 	break;
     }
     if (!saveHostname)
     {
-    	XdmcpDisposeARRAY8 (&hostname);
-    	XdmcpDisposeARRAY8 (&status);
+	XdmcpDisposeARRAY8 (&hostname);
+	XdmcpDisposeARRAY8 (&status);
     }
 }
 
@@ -750,7 +750,7 @@ RegisterHostname (char *name)
 	    if (!hostent)
 		return;
 	    if (hostent->h_addrtype != AF_INET || hostent->h_length != 4)
-	    	return;
+		return;
 	    in_addr.sin_family = hostent->h_addrtype;
 	    memmove( &in_addr.sin_addr, hostent->h_addr, 4);
 	}
@@ -987,8 +987,8 @@ Choose (HostName *h)
     {
 	int i;
 
-    	printf ("%u\n", h->connectionType);
-    	for (i = 0; i < (int)h->hostaddr.length; i++)
+	printf ("%u\n", h->connectionType);
+	for (i = 0; i < (int)h->hostaddr.length; i++)
 	    printf ("%u%s", h->hostaddr.data[i],
 		    i == h->hostaddr.length - 1 ? "\n" : " ");
     }
@@ -1056,9 +1056,9 @@ Hostselect (int line)
 	liney = lineheight * line;
 
 	if ((y + liney) < 0) {
-    	    XawViewportSetCoordinates(viewport, 0, liney);
+	    XawViewportSetCoordinates(viewport, 0, liney);
 	} else if ((y + liney + lineheight) > portheight) {
-    	    XawViewportSetCoordinates(viewport, 0,
+	    XawViewportSetCoordinates(viewport, 0,
 				      (liney + lineheight) - portheight);
 	}
 
@@ -1378,4 +1378,3 @@ CvtStringToARRAY8 (XrmValuePtr args, Cardinal *num_args, XrmValuePtr fromVal, Xr
     toVal->addr = (caddr_t) &dest;
     toVal->size = sizeof (ARRAY8Ptr);
 }
-
diff --git a/dm.c b/dm.c
index da18800..7016daf 100644
--- a/dm.c
+++ b/dm.c
@@ -268,7 +268,7 @@ ScanServers (void)
     {
 	serversFile = fopen (servers, "r");
 	if (serversFile == NULL)
- 	{
+	{
 	    LogError ("cannot access servers file %s\n", servers);
 	    return;
 	}
@@ -504,9 +504,9 @@ WaitForChild (void)
 		       d->startTries, d->startAttempts);
 		LogError ("Display %s cannot be opened\n", d->name);
 		/*
- 		 * no display connection was ever made, tell the
+		 * no display connection was ever made, tell the
 		 * terminal that the open attempt failed
- 		 */
+		 */
 #ifdef XDMCP
 		if (d->displayType.origin == FromXDMCP)
 		    SendFailed (d, "Cannot open display");
@@ -572,7 +572,7 @@ WaitForChild (void)
 		d->startTries = 0;
 		Debug ("Display exited with REMANAGE_DISPLAY\n");
 		/*
- 		 * XDMCP will restart the session if the display
+		 * XDMCP will restart the session if the display
 		 * requests it
 		 */
 		if (d->displayType.origin == FromXDMCP || d->status == zombie)
@@ -730,8 +730,8 @@ StartDisplay (struct display *d)
 	 * certainly notice when they exit
 	 */
 	d->pingInterval = 0;
-    	if (d->authorize)
-    	{
+	if (d->authorize)
+	{
 	    Debug ("SetLocalAuthorization %s, auth %s\n",
 		    d->name, d->authNames[0]);
 	    SetLocalAuthorization (d);
@@ -743,7 +743,7 @@ StartDisplay (struct display *d)
 	     */
 	    if (d->serverPid != -1 && d->resetForAuth && d->resetSignal)
 		kill (d->serverPid, d->resetSignal);
-    	}
+	}
 	if (d->serverPid == -1 && !StartServer (d))
 	{
 	    LogError ("Server for display %s can't be started, session disabled\n", d->name);
diff --git a/file.c b/file.c
index 9deeec9..d64bb15 100644
--- a/file.c
+++ b/file.c
@@ -76,9 +76,9 @@ splitIntoWords (char *s)
 	    ++s;
 	if (!args)
 	{
-    	    args = (char **) malloc (2 * sizeof (char *));
-    	    if (!args)
-	    	return NULL;
+	    args = (char **) malloc (2 * sizeof (char *));
+	    if (!args)
+		return NULL;
 	}
 	else
 	{
@@ -86,8 +86,8 @@ splitIntoWords (char *s)
 					 (nargs+2)*sizeof (char *));
 	    if (!newargs)
 	    {
-	    	freeFileArgs (args);
-	    	return NULL;
+		freeFileArgs (args);
+		return NULL;
 	    }
 	    args = newargs;
 	}
diff --git a/policy.c b/policy.c
index da016bb..33a14f6 100644
--- a/policy.c
+++ b/policy.c
@@ -104,10 +104,10 @@ SelectAuthorizationTypeIndex (
 	    break;
     if (j < NumAuth)
     {
-    	for (i = 0; i < (int)authorizationNames->length; i++)
+	for (i = 0; i < (int)authorizationNames->length; i++)
 	    if (XdmcpARRAY8Equal (&authorizationNames->data[i],
 				  &auth[j].authorization))
-	    	return i;
+		return i;
     }
     for (i = 0; i < (int)authorizationNames->length; i++)
 	if (ValidAuthorization (authorizationNames->data[i].length,
diff --git a/server.c b/server.c
index 3c39b3a..8ffa9df 100644
--- a/server.c
+++ b/server.c
@@ -293,9 +293,9 @@ WaitForServer (struct display *d)
     static int i;
 
     for (i = 0; i < (d->openRepeat > 0 ? d->openRepeat : 1); i++) {
-    	(void) Signal (SIGALRM, abortOpen);
-    	(void) alarm ((unsigned) d->openTimeout);
-    	if (!Setjmp (openAbort)) {
+	(void) Signal (SIGALRM, abortOpen);
+	(void) alarm ((unsigned) d->openTimeout);
+	if (!Setjmp (openAbort)) {
 	    Debug ("Before XOpenDisplay(%s)\n", d->name);
 	    errno = 0;
 	    (void) XSetIOErrorHandler (openErrorHandler);
@@ -317,24 +317,24 @@ WaitForServer (struct display *d)
 	    Debug ("After XOpenDisplay(%s)\n", d->name);
 	    if (d->dpy) {
 #ifdef XDMCP
-	    	if (d->displayType.location == Foreign)
+		if (d->displayType.location == Foreign)
 		    GetRemoteAddress (d, ConnectionNumber (d->dpy));
 #endif
-	    	RegisterCloseOnFork (ConnectionNumber (d->dpy));
+		RegisterCloseOnFork (ConnectionNumber (d->dpy));
 		(void) fcntl (ConnectionNumber (d->dpy), F_SETFD, 0);
-	    	return 1;
+		return 1;
 	    } else {
-	    	Debug ("OpenDisplay failed %d (%s) on \"%s\"\n",
+		Debug ("OpenDisplay failed %d (%s) on \"%s\"\n",
 		       errno, strerror (errno), d->name);
 	    }
 	    Debug ("waiting for server to start %d\n", i);
 	    sleep ((unsigned) d->openDelay);
-    	} else {
+	} else {
 	    Debug ("hung in open, aborting\n");
 	    LogError ("Hung in XOpenDisplay(%s), aborting\n", d->name);
 	    (void) Signal (SIGALRM, SIG_DFL);
 	    break;
-    	}
+	}
     }
     Debug ("giving up on server\n");
     LogError ("server open failed for %s, giving up\n", d->name);
diff --git a/session.c b/session.c
index 13b7fa0..15747f4 100644
--- a/session.c
+++ b/session.c
@@ -287,7 +287,7 @@ void
 SessionPingFailed (struct display *d)
 {
     if (clientPid > 1) {
-    	AbortClient (clientPid);
+	AbortClient (clientPid);
 	source (verify.systemEnviron, d->reset);
     }
     SessionExit (d, RESERVER_DISPLAY, TRUE);
@@ -443,9 +443,9 @@ SetupDisplay (struct display *d)
     char	**env = NULL;
 
     if (d->setup && d->setup[0]) {
-    	env = systemEnv (d, (char *) 0, (char *) 0);
-    	(void) source (env, d->setup);
-    	freeEnv (env);
+	env = systemEnv (d, (char *) 0, (char *) 0);
+	(void) source (env, d->setup);
+	freeEnv (env);
     }
 }
 
diff --git a/util.c b/util.c
index 15081e0..65b3b85 100644
--- a/util.c
+++ b/util.c
@@ -198,9 +198,9 @@ freeEnv (char **env)
 
     if (env)
     {
-    	for (e = env; *e; e++)
+	for (e = env; *e; e++)
 	    free (*e);
-    	free (env);
+	free (env);
     }
 }
 
diff --git a/xdmcp.c b/xdmcp.c
index 66a5e0f..24d4396 100644
--- a/xdmcp.c
+++ b/xdmcp.c
@@ -316,18 +316,18 @@ indirect_respond (
 	/*
 	 * set up the forward query packet
 	 */
-    	header.version = XDM_PROTOCOL_VERSION;
-    	header.opcode = (CARD16) FORWARD_QUERY;
-    	header.length = 0;
-    	header.length += 2 + clientAddress.length;
-    	header.length += 2 + clientPort.length;
-    	header.length += 1;
-    	for (i = 0; i < (int)queryAuthenticationNames.length; i++)
+	header.version = XDM_PROTOCOL_VERSION;
+	header.opcode = (CARD16) FORWARD_QUERY;
+	header.length = 0;
+	header.length += 2 + clientAddress.length;
+	header.length += 2 + clientPort.length;
+	header.length += 1;
+	for (i = 0; i < (int)queryAuthenticationNames.length; i++)
 	    header.length += 2 + queryAuthenticationNames.data[i].length;
-    	XdmcpWriteHeader (&buffer, &header);
-    	XdmcpWriteARRAY8 (&buffer, &clientAddress);
-    	XdmcpWriteARRAY8 (&buffer, &clientPort);
-    	XdmcpWriteARRAYofARRAY8 (&buffer, &queryAuthenticationNames);
+	XdmcpWriteHeader (&buffer, &header);
+	XdmcpWriteARRAY8 (&buffer, &clientAddress);
+	XdmcpWriteARRAY8 (&buffer, &clientPort);
+	XdmcpWriteARRAYofARRAY8 (&buffer, &queryAuthenticationNames);
 
 	localHostAsWell = ForEachMatchingIndirectHost (&clientAddress, connectionType, sendForward, (char *) &fd);
 
@@ -581,15 +581,15 @@ NetworkAddressToName(
 		{
 		    if (removeDomainname)
 		    {
-		    	char    *localDot, *remoteDot;
+			char    *localDot, *remoteDot;
 
 			/* check for a common domain name.  This
 			 * could reduce names by recognising common
 			 * super-domain names as well, but I don't think
 			 * this is as useful, and will confuse more
 			 * people
- 			 */
-		    	if ((localDot = strchr(localhost, '.')) &&
+			 */
+			if ((localDot = strchr(localhost, '.')) &&
 		            (remoteDot = strchr(hostname, '.')))
 			{
 			    /* smash the name in place; it won't
@@ -673,15 +673,15 @@ NetworkAddressToName(
 		{
 		    if (removeDomainname)
 		    {
-		    	char    *localDot, *remoteDot;
+			char    *localDot, *remoteDot;
 
 			/* check for a common domain name.  This
 			 * could reduce names by recognising common
 			 * super-domain names as well, but I don't think
 			 * this is as useful, and will confuse more
 			 * people
- 			 */
-		    	if ((localDot = strchr(localhost, '.')) &&
+			 */
+			if ((localDot = strchr(localhost, '.')) &&
 		            (remoteDot = strchr(hostent->h_name, '.')))
 			{
 			    /* smash the name in place; it won't
@@ -760,8 +760,8 @@ forward_respond (
 	    for (i = 0; i < (int)clientAddress.length; i++)
 		Debug (" %d", clientAddress.data[i]);
 	    Debug ("\n");
-    	    switch (from->sa_family)
-    	    {
+	    switch (from->sa_family)
+	    {
 # ifdef AF_INET
 	    case AF_INET:
 		{
@@ -858,7 +858,7 @@ forward_respond (
 	    case AF_DECnet:
 		goto badAddress;
 # endif
-    	    }
+	    }
 	}
 	else
 	{
@@ -1379,7 +1379,7 @@ send_alive (
 	    sendRunning = 0;
 	    sendSessionID = 0;
 	    if (d && d->status == running)
- 	    {
+	    {
 		if (d->sessionID == sessionID)
 		    sendRunning = 1;
 		sendSessionID = d->sessionID;
@@ -1481,7 +1481,7 @@ NetworkAddressToHostname (
 		/* can't get name, so use emergency fallback */
 # if defined(IPv6) && defined(AF_INET6)
 		inet_ntop(af_type, connectionAddress->data,
-		  	  dotted, sizeof(dotted));
+			  dotted, sizeof(dotted));
 # else
 		snprintf(dotted, sizeof(dotted), "%d.%d.%d.%d",
 			 connectionAddress->data[0],
diff --git a/xdmshell.c b/xdmshell.c
index bd362aa..118031f 100644
--- a/xdmshell.c
+++ b/xdmshell.c
@@ -158,4 +158,3 @@ main (
     exit (0);
     /*NOTREACHED*/
 }
-
-- 
1.6.0.4



More information about the xorg-devel mailing list