mirror of https://github.com/0intro/wmii
I suck, I suck and I suck; fuck vim; used ed to fix things up
This commit is contained in:
parent
cedde2e43f
commit
fcb1b5fdaf
|
@ -72,20 +72,17 @@ connect_inet_sock(char *host)
|
|||
int
|
||||
ixp_connect_sock(char *address)
|
||||
{
|
||||
char *p = strchr(address, '!');
|
||||
char *addr, *type;
|
||||
char *p;
|
||||
|
||||
if(!p)
|
||||
return -1;
|
||||
if(p = strchr(address, '!')) {
|
||||
*p = 0;
|
||||
p++;
|
||||
|
||||
addr = &p[1];
|
||||
type = address; /* unix, inet */
|
||||
|
||||
if(!strncmp(type, "unix", 5))
|
||||
return connect_unix_sock(addr);
|
||||
else if(!strncmp(type, "tcp", 4))
|
||||
return connect_inet_sock(addr);
|
||||
if(!strncmp(address, "unix", 5))
|
||||
return connect_unix_sock(p);
|
||||
else if(!strncmp(address, "tcp", 4))
|
||||
return connect_inet_sock(p);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue