summaryrefslogtreecommitdiff
path: root/netlib.c
diff options
context:
space:
mode:
authorMichael Tatarinov <kukabu@gmail.com>2011-06-27 11:33:23 +0400
committerEric S. Raymond <esr@thyrsus.com>2011-06-27 03:38:52 -0400
commitd590e2186b4cf573cd24cb9f0efaa5cb12c98b03 (patch)
treef9b6679760578b5c42e423c8c7bb00bd633fb1b4 /netlib.c
parent1dcbdc6955748a97611b59bf8e1d3a49f18fdb83 (diff)
downloadgpsd-d590e2186b4cf573cd24cb9f0efaa5cb12c98b03.tar.gz
Removed duplicate code.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'netlib.c')
-rw-r--r--netlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/netlib.c b/netlib.c
index d5ca89fe..d83d6a63 100644
--- a/netlib.c
+++ b/netlib.c
@@ -147,12 +147,12 @@ char /*@observer@*/ *netlib_errstr(const int err)
}
}
-socket_t netlib_localsocket(const char *sockfile)
+socket_t netlib_localsocket(const char *sockfile, int socktype)
/* acquire a connection to an existing Unix-domain socket */
{
int sock;
- if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
+ if ((sock = socket(AF_UNIX, socktype, 0)) < 0) {
return -1;
} else {
struct sockaddr_un saddr;