summaryrefslogtreecommitdiffstats
path: root/fs/cifs/netmisc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-11-26 11:09:55 -0500
committerSteve French <smfrench@gmail.com>2012-12-05 13:27:30 -0600
commitb979aaa1777259330435c47f900833dabe9189e8 (patch)
tree45db63a100144fd74e5997ab329f855bed520ed1 /fs/cifs/netmisc.c
parentccb5c001b3035ca470fe21424e439530ba838510 (diff)
downloadlinux-b979aaa1777259330435c47f900833dabe9189e8.tar.bz2
cifs: get rid of smb_vol->UNCip and smb_vol->port
Passing this around as a string is contorted and painful. Instead, just convert these to a sockaddr as soon as possible, since that's how we're going to work with it later anyway. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/netmisc.c')
-rw-r--r--fs/cifs/netmisc.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index d5ce9e26696c..a82bc51fdc82 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -204,7 +204,7 @@ cifs_convert_address(struct sockaddr *dst, const char *src, int len)
return rc;
}
-int
+void
cifs_set_port(struct sockaddr *addr, const unsigned short int port)
{
switch (addr->sa_family) {
@@ -214,19 +214,7 @@ cifs_set_port(struct sockaddr *addr, const unsigned short int port)
case AF_INET6:
((struct sockaddr_in6 *)addr)->sin6_port = htons(port);
break;
- default:
- return 0;
}
- return 1;
-}
-
-int
-cifs_fill_sockaddr(struct sockaddr *dst, const char *src, int len,
- const unsigned short int port)
-{
- if (!cifs_convert_address(dst, src, len))
- return 0;
- return cifs_set_port(dst, port);
}
/*****************************************************************************