summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-27 20:29:36 -0700
committerJeremy Allison <jra@samba.org>2007-10-27 20:29:36 -0700
commitd4307679b95088d05f0abad440de5e961ee965df (patch)
tree124a0602838845ac10494bcfa2b8014b115aefee /source3/libsmb
parentc7a7c08db5e998c8e698a11d3ec209b2744763da (diff)
downloadsamba-d4307679b95088d05f0abad440de5e961ee965df.tar.gz
samba-d4307679b95088d05f0abad440de5e961ee965df.tar.bz2
samba-d4307679b95088d05f0abad440de5e961ee965df.zip
Change all occurrences of zero_addr(&ss,AF_INET) to
zero_addr(&ss). All current uses were always of the AF_INET form, so simplify the call. If in the future we need to zero an addr to AF_INET6 this can be done separately. Jeremy. (This used to be commit 2e92418a138bf2738b77b7e0fcb2fa37ad84fc0c)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c2
-rw-r--r--source3/libsmb/clidfs.c4
-rw-r--r--source3/libsmb/libsmbclient.c6
-rw-r--r--source3/libsmb/namequery.c8
-rw-r--r--source3/libsmb/namequery_dc.c4
5 files changed, 12 insertions, 12 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 826315ad7a..448bfd7663 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1519,7 +1519,7 @@ NTSTATUS cli_start_connection(struct cli_state **output_cli,
if (dest_ss) {
ss = *dest_ss;
} else {
- zero_addr(&ss, AF_INET);
+ zero_addr(&ss);
}
again:
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index e1ca924b09..6393f654c0 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -83,13 +83,13 @@ static struct cli_state *do_connect( const char *server, const char *share,
server_n = server;
- zero_addr(&ss, AF_INET);
+ zero_addr(&ss);
make_nmb_name(&calling, global_myname(), 0x0);
make_nmb_name(&called , server, name_type);
again:
- zero_addr(&ss, AF_INET);
+ zero_addr(&ss);
if (have_ip)
ss = dest_ss;
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index d5bf1828c6..0b45cad3e1 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -654,7 +654,7 @@ smbc_server(SMBCCTX *context,
const char *username_used;
NTSTATUS status;
- zero_addr(&ss, AF_INET);
+ zero_addr(&ss);
ZERO_STRUCT(c);
if (server[0] == 0) {
@@ -742,7 +742,7 @@ smbc_server(SMBCCTX *context,
again:
slprintf(ipenv,sizeof(ipenv)-1,"HOST_%s", server_n);
- zero_addr(&ss, AF_INET);
+ zero_addr(&ss);
/* have to open a new connection */
if ((c = cli_initialise()) == NULL) {
@@ -964,7 +964,7 @@ smbc_attr_server(SMBCCTX *context,
flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
}
- zero_addr(&ss, AF_INET);
+ zero_addr(&ss);
nt_status = cli_full_connection(&ipc_cli,
global_myname(), server,
&ss, 0, "IPC$", "?????",
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 34fe09b8c2..f4c516921c 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -331,7 +331,7 @@ bool name_status_find(const char *q_name,
if (!interpret_string_addr(&ss, lp_socket_address(),
AI_NUMERICHOST|AI_PASSIVE)) {
- zero_addr(&ss, AF_INET);
+ zero_addr(&ss);
}
sock = open_socket_in(SOCK_DGRAM, 0, 3, &ss, True);
@@ -528,7 +528,7 @@ static int remove_duplicate_addrs2(struct ip_service *iplist, int count )
for ( j=i+1; j<count; j++ ) {
if (addr_equal(&iplist[i].ss, &iplist[j].ss) &&
iplist[i].port == iplist[j].port) {
- zero_addr(&iplist[j].ss, AF_INET);
+ zero_addr(&iplist[j].ss);
}
}
}
@@ -942,7 +942,7 @@ NTSTATUS name_resolve_bcast(const char *name,
if (!interpret_string_addr(&ss, lp_socket_address(),
AI_NUMERICHOST|AI_PASSIVE)) {
- zero_addr(&ss, AF_INET);
+ zero_addr(&ss);
}
sock = open_socket_in( SOCK_DGRAM, 0, 3, &ss, true );
@@ -1030,7 +1030,7 @@ NTSTATUS resolve_wins(const char *name,
/* the address we will be sending from */
if (!interpret_string_addr(&src_ss, lp_socket_address(),
AI_NUMERICHOST|AI_PASSIVE)) {
- zero_addr(&src_ss, AF_INET);
+ zero_addr(&src_ss);
}
if (src_ss.ss_family != AF_INET) {
diff --git a/source3/libsmb/namequery_dc.c b/source3/libsmb/namequery_dc.c
index 0fa4b93990..06926a762b 100644
--- a/source3/libsmb/namequery_dc.c
+++ b/source3/libsmb/namequery_dc.c
@@ -134,7 +134,7 @@ static bool ads_dc_name(const char *domain,
#ifdef HAVE_ADS
*dc_ss = ads->ldap.ss;
#else
- zero_addr(dc_ss,AF_INET);
+ zero_addr(dc_ss);
#endif
ads_destroy(&ads);
@@ -217,7 +217,7 @@ bool get_dc_name(const char *domain,
bool ret;
bool our_domain = False;
- zero_addr(&dc_ss, AF_INET);
+ zero_addr(&dc_ss);
ret = False;