Commit 64d51869 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

whitespace cleanup

empty lines and trailing whitespace
parent e5b4532a
......@@ -210,7 +210,7 @@ TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port)
strcpy (mybuf, address);
/* Parse the string to get each component */
/* Get the protocol part */
_protocol = mybuf;
......@@ -287,9 +287,9 @@ TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port)
}
#if defined(IPv6) && defined(AF_INET6)
/* hostname in IPv6 [numeric_addr]:0 form? */
else if ( (_host_len > 3) &&
else if ( (_host_len > 3) &&
((strcmp(_protocol, "tcp") == 0) || (strcmp(_protocol, "inet6") == 0))
&& (*_host == '[') && (*(_host + _host_len - 1) == ']') ) {
&& (*_host == '[') && (*(_host + _host_len - 1) == ']') ) {
struct sockaddr_in6 sin6;
*(_host + _host_len - 1) = '\0';
......@@ -451,7 +451,7 @@ TRANS(Open) (int type, char *address)
if (ciptr == NULL)
{
if (!(thistrans->flags & TRANS_DISABLED))
if (!(thistrans->flags & TRANS_DISABLED))
{
PRMSG (1,"Open: transport open failed for %s/%s:%s\n",
protocol, host, port);
......@@ -625,7 +625,7 @@ TRANS(ReopenCLTSServer) (int trans_id, int fd, char *port)
int
TRANS(GetReopenInfo) (XtransConnInfo ciptr,
TRANS(GetReopenInfo) (XtransConnInfo ciptr,
int *trans_id, int *fd, char **port)
{
......@@ -731,7 +731,7 @@ TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg)
#endif /* F_SETFD */
break;
}
return ret;
}
......@@ -750,10 +750,10 @@ TRANS(NoListen) (char * protocol)
{
Xtransport *trans;
int i = 0, ret = 0;
if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
{
PRMSG (1,"TransNoListen: unable to find transport: %s\n",
PRMSG (1,"TransNoListen: unable to find transport: %s\n",
protocol, 0, 0);
return -1;
......@@ -834,7 +834,7 @@ TRANS(Connect) (XtransConnInfo ciptr, char *address)
if (protocol) free (protocol);
if (host) free (host);
if (port) free (port);
return ret;
}
......@@ -922,7 +922,7 @@ TRANS(IsLocal) (XtransConnInfo ciptr)
int
TRANS(GetMyAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
TRANS(GetMyAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
Xtransaddr **addrp)
{
......@@ -942,7 +942,7 @@ TRANS(GetMyAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
}
int
TRANS(GetPeerAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
TRANS(GetPeerAddr) (XtransConnInfo ciptr, int *familyp, int *addrlenp,
Xtransaddr **addrp)
{
......@@ -1008,7 +1008,7 @@ complete_network_count (void)
int
TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
XtransConnInfo **ciptrs_ret)
{
......@@ -1089,7 +1089,7 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
if (Xtransports[i].transport_id == TRANS_SOCKET_INET6_INDEX)
ipv6_succ = 1;
#endif
PRMSG (5,
"MakeAllCOTSServerListeners: opened listener for %s, %d\n",
trans->TransName, ciptr->fd, 0);
......@@ -1119,12 +1119,12 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
}
else
*ciptrs_ret = NULL;
return 0;
}
int
TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
XtransConnInfo **ciptrs_ret)
{
......@@ -1217,7 +1217,7 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
}
else
*ciptrs_ret = NULL;
return 0;
}
......
......@@ -467,7 +467,7 @@ TRANS(GetPeerNetworkId)(
#endif /* ICE_t */
int
int
TRANS(GetHostname) (
char * /* buf */,
int /* maxlen */
......
......@@ -53,10 +53,10 @@ from The Open Group.
#define _XTRANSINT_H_
/*
* XTRANSDEBUG will enable the PRMSG() macros used in the X Transport
* Interface code. Each use of the PRMSG macro has a level associated with
* it. XTRANSDEBUG is defined to be a level. If the invocation level is =<
* the value of XTRANSDEBUG, then the message will be printed out to stderr.
* XTRANSDEBUG will enable the PRMSG() macros used in the X Transport
* Interface code. Each use of the PRMSG macro has a level associated with
* it. XTRANSDEBUG is defined to be a level. If the invocation level is =<
* the value of XTRANSDEBUG, then the message will be printed out to stderr.
* Recommended levels are:
*
* XTRANSDEBUG=1 Error messages
......
......@@ -51,7 +51,7 @@ from The Open Group.
/*
*
* The connection code/ideas in lib/X and server/os for SVR4/Intel
* The connection code/ideas in lib/X and server/os for SVR4/Intel
* environments was contributed by the following companies/groups:
*
* MetroLink Inc
......@@ -63,12 +63,12 @@ from The Open Group.
*
* The goal is to have common connection code among all SVR4/Intel vendors.
*
* ALL THE ABOVE COMPANIES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THESE COMPANIES * BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
* ALL THE ABOVE COMPANIES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THESE COMPANIES * BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
* OR PERFORMANCE OF THIS SOFTWARE.
*/
......@@ -1102,7 +1102,7 @@ TRANS(ISCOpenServer)(XtransConnInfo ciptr, char *port)
PRMSG(1,"ISCOpenServer: failed to link %s to %s\n",
server_path, server_unix_path, 0 );
/*
* Don't make this failure fatal since the listener
* Don't make this failure fatal since the listener
* is already established, and this just for compatability
*/
#else
......@@ -1117,7 +1117,7 @@ TRANS(ISCOpenServer)(XtransConnInfo ciptr, char *port)
PRMSG(1,"ISCOpenServer: failed to link %s to %s\n",
server_path, server_unix_path, 0 );
/*
* Don't make this failure fatal since the listener
* Don't make this failure fatal since the listener
* is already established, and this just for compatability
*/
#endif /* SVR4 */
......@@ -2210,7 +2210,7 @@ TRANS(LocalReopenServer)(int type, int index, int fd, char *port)
#ifdef TRANS_CLIENT
static XtransConnInfo
TRANS(LocalOpenCOTSClient)(Xtransport *thistrans, char *protocol,
TRANS(LocalOpenCOTSClient)(Xtransport *thistrans, char *protocol,
char *host, char *port)
{
......@@ -2225,7 +2225,7 @@ TRANS(LocalOpenCOTSClient)(Xtransport *thistrans, char *protocol,
#ifdef TRANS_SERVER
static XtransConnInfo
TRANS(LocalOpenCOTSServer)(Xtransport *thistrans, char *protocol,
TRANS(LocalOpenCOTSServer)(Xtransport *thistrans, char *protocol,
char *host, char *port)
{
......@@ -2269,7 +2269,7 @@ TRANS(LocalOpenCOTSServer)(Xtransport *thistrans, char *protocol,
#ifdef TRANS_CLIENT
static XtransConnInfo
TRANS(LocalOpenCLTSClient)(Xtransport *thistrans, char *protocol,
TRANS(LocalOpenCLTSClient)(Xtransport *thistrans, char *protocol,
char *host, char *port)
{
......@@ -2284,7 +2284,7 @@ TRANS(LocalOpenCLTSClient)(Xtransport *thistrans, char *protocol,
#ifdef TRANS_SERVER
static XtransConnInfo
TRANS(LocalOpenCLTSServer)(Xtransport *thistrans, char *protocol,
TRANS(LocalOpenCLTSServer)(Xtransport *thistrans, char *protocol,
char *host, char *port)
{
......@@ -2524,7 +2524,7 @@ TRANS(LocalCloseForCloning)(XtransConnInfo ciptr)
* MakeAllCOTSServerListeners() will go through the entire Xtransports[]
* array defined in Xtrans.c and try to OpenCOTSServer() for each entry.
* We will add duplicate entries to that table so that the OpenCOTSServer()
* function will get called once for each type of local transport.
* function will get called once for each type of local transport.
*
* The TransName is in lowercase, so it will never match during a normal
* call to SelectTransport() in Xtrans.c.
......
......@@ -140,7 +140,7 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
{
*familyp=FamilyLocal;
}
else
else
{
*familyp=FamilyInternet;
*addrlenp = sizeof (struct in_addr);
......@@ -165,7 +165,7 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
*familyp=FamilyLocal;
break;
}
#endif /* defined(UNIXCONN) || defined(LOCALCONN)*/
#endif /* defined(UNIXCONN) || defined(LOCALCONN) */
#if (defined(__SCO__) || defined(__UNIXWARE__)) && defined(LOCALCONN)
case 0:
......@@ -188,7 +188,7 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
* In the case of a local connection, we need to get the
* host name for authentication.
*/
char hostnamebuf[256];
int len = TRANS(GetHostname) (hostnamebuf, sizeof hostnamebuf);
......@@ -377,7 +377,7 @@ TRANS(GetPeerNetworkId) (XtransConnInfo ciptr)
* Assume that if it does not respond in NAMESERVER_TIMEOUT seconds
* that something is wrong and do not make the user wait.
* gethostbyaddr will continue after a signal, so we have to
* jump out of it.
* jump out of it.
*/
nameserver_timedout = 0;
......@@ -469,7 +469,7 @@ is_numeric (char *str)
* it's not save if the directory has non-root ownership or the sticky
* bit cannot be set and fail.
*/
static int
static int
trans_mkdir(char *path, int mode)
{
struct stat buf;
......@@ -492,7 +492,7 @@ trans_mkdir(char *path, int mode)
if (mode & 01000) {
PRMSG(1, "mkdir: ERROR: euid != 0,"
"directory %s will not be created.\n",
path, 0, 0);
path, 0, 0);
#ifdef FAIL_HARD
return -1;
#endif
......@@ -522,7 +522,7 @@ trans_mkdir(char *path, int mode)
}
return 0;
} else {
if (S_ISDIR(buf.st_mode)) {
int updateOwner = 0;
......@@ -541,7 +541,7 @@ trans_mkdir(char *path, int mode)
*/
if ((~mode) & 0077 & buf.st_mode)
updateMode = 1;
/*
* If the directory is not writeable not everybody may
* be able to create sockets. Therefore warn if mode
......@@ -551,7 +551,7 @@ trans_mkdir(char *path, int mode)
updateMode = 1;
status |= WARN_NO_ACCESS;
}
/*
* If 'sticky' bit is requested fail if owner isn't root
* as we assume the caller makes certain security implications
......@@ -563,7 +563,7 @@ trans_mkdir(char *path, int mode)
updateMode = 1;
}
}
#ifdef HAS_FCHOWN
/*
* If fchown(2) and fchmod(2) are available, try to correct the
......@@ -598,7 +598,7 @@ trans_mkdir(char *path, int mode)
}
}
#endif
if (updateOwner && !updatedOwner) {
#ifdef FAIL_HARD
if (status & FAIL_IF_NOT_ROOT) {
......@@ -610,7 +610,7 @@ trans_mkdir(char *path, int mode)
PRMSG(1, "mkdir: Owner of %s should be set to root\n",
path, 0, 0);
}
if (updateMode && !updatedMode) {
#ifdef FAIL_HARD
if (status & FAIL_IF_NOMODE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment