diff options
author | David Howells <dhowells@redhat.com> | 2010-07-22 13:33:01 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-08-05 13:17:50 -0400 |
commit | 67b7626a0512d12e34b38ff45e32c693cf9c79a1 (patch) | |
tree | b62f4274a09d0e7ceee6325c077f487c2bceca3b /fs/cifs/connect.c | |
parent | f579903ef3e392251dc7e93cb521ddb622fbf8e0 (diff) |
CIFS: Make cifs_convert_address() take a const src pointer and a length
Make cifs_convert_address() take a const src pointer and a length so that all
the strlen() calls in their can be cut out and to make it unnecessary to modify
the src string.
Also return the data length from dns_resolve_server_name_to_ip() so that a
strlen() can be cut out of cifs_compose_mount_options() too.
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 2a43a0aca965..95c2ea67edfb 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1543,6 +1543,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1543 | if (volume_info->UNCip && volume_info->UNC) { | 1543 | if (volume_info->UNCip && volume_info->UNC) { |
1544 | rc = cifs_fill_sockaddr((struct sockaddr *)&addr, | 1544 | rc = cifs_fill_sockaddr((struct sockaddr *)&addr, |
1545 | volume_info->UNCip, | 1545 | volume_info->UNCip, |
1546 | strlen(volume_info->UNCip), | ||
1546 | volume_info->port); | 1547 | volume_info->port); |
1547 | if (!rc) { | 1548 | if (!rc) { |
1548 | /* we failed translating address */ | 1549 | /* we failed translating address */ |