summaryrefslogtreecommitdiff
path: root/app/xenodm
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2018-07-10 13:57:33 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2018-07-10 13:57:33 +0000
commit3ae9d7be1c0b500cf47a707204114cc9e79e3189 (patch)
tree85356a9d947d9a0a1202b03675344f35b07b267c /app/xenodm
parentb60f76f3105e0923a944883d63c894b373244627 (diff)
Remove unused code.
Diffstat (limited to 'app/xenodm')
-rw-r--r--app/xenodm/include/dm.h2
-rw-r--r--app/xenodm/xenodm/netaddr.c55
2 files changed, 0 insertions, 57 deletions
diff --git a/app/xenodm/include/dm.h b/app/xenodm/include/dm.h
index da584def7..0fdacc449 100644
--- a/app/xenodm/include/dm.h
+++ b/app/xenodm/include/dm.h
@@ -208,10 +208,8 @@ extern void ParseDisplay (char *source);
/* in netaddr.c */
extern char *NetaddrAddress(XdmcpNetaddr netaddrp, int *lenp);
-extern char *NetaddrPort(XdmcpNetaddr netaddrp, int *lenp);
extern int ConvertAddr (XdmcpNetaddr saddr, int *len, char **addr);
extern int NetaddrFamily (XdmcpNetaddr netaddrp);
-extern int addressEqual (XdmcpNetaddr a1, int len1, XdmcpNetaddr a2, int len2);
/* in reset.c */
extern void pseudoReset (Display *dpy);
diff --git a/app/xenodm/xenodm/netaddr.c b/app/xenodm/xenodm/netaddr.c
index ad2bff0b9..ace838d51 100644
--- a/app/xenodm/xenodm/netaddr.c
+++ b/app/xenodm/xenodm/netaddr.c
@@ -62,33 +62,6 @@ int NetaddrFamily(XdmcpNetaddr netaddrp)
# endif
}
-
-/* given an XdmcpNetaddr, returns a pointer to the TCP/UDP port used
- and sets *lenp to the length of the address
- or 0 if not using TCP or UDP. */
-
-char * NetaddrPort(XdmcpNetaddr netaddrp, int *lenp)
-{
-# ifdef STREAMSCONN
- *lenp = 2;
- return netaddrp+2;
-# else
- switch (NetaddrFamily(netaddrp))
- {
- case AF_INET:
- *lenp = 2;
- return (char *)&(((struct sockaddr_in *)netaddrp)->sin_port);
- case AF_INET6:
- *lenp = 2;
- return (char *)&(((struct sockaddr_in6 *)netaddrp)->sin6_port);
- default:
- *lenp = 0;
- return NULL;
- }
-# endif
-}
-
-
/* given an XdmcpNetaddr, returns a pointer to the network address
and sets *lenp to the length of the address */
@@ -177,34 +150,6 @@ int ConvertAddr (XdmcpNetaddr saddr, int *len, char **addr)
return retval;
}
-int
-addressEqual (XdmcpNetaddr a1, int len1, XdmcpNetaddr a2, int len2)
-{
- int partlen1, partlen2;
- char *part1, *part2;
-
- if (len1 != len2)
- {
- return FALSE;
- }
- if (NetaddrFamily(a1) != NetaddrFamily(a2))
- {
- return FALSE;
- }
- part1 = NetaddrPort(a1, &partlen1);
- part2 = NetaddrPort(a2, &partlen2);
- if (partlen1 != partlen2 || memcmp(part1, part2, partlen1) != 0)
- {
- return FALSE;
- }
- part1 = NetaddrAddress(a1, &partlen1);
- part2 = NetaddrAddress(a2, &partlen2);
- if (partlen1 != partlen2 || memcmp(part1, part2, partlen1) != 0)
- {
- return FALSE;
- }
- return TRUE;
-}
# ifdef DEBUG
/*ARGSUSED*/