From 585d0efbc6428e5876d354fee49c241c1bad809d Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 26 Nov 2001 03:11:44 +0000 Subject: Got medieval on another pointless extern. Removed extern struct ipzero and replaced with two functions: void zero_ip(struct in_adder *ip); BOOL is_zero_ip(struct in_addr ip); (This used to be commit 778f5f77a66cda76348a7c6f64cd63afe2bfe077) --- source3/utils/net.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/utils/net.c') diff --git a/source3/utils/net.c b/source3/utils/net.c index 224de31ebf..d0d73b59f3 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -286,7 +286,6 @@ static const char *share_type[] = { /************************************************************************************/ extern int optind, opterr, optopt; -extern struct in_addr ipzero; static struct cli_state *cli; static char *opt_requester_name; @@ -355,14 +354,15 @@ static struct cli_state *connect_to_ipc(char *server) server_n = server; - ip = ipzero; + zero_ip(&ip); make_nmb_name(&calling, opt_requester_name, 0x0); make_nmb_name(&called , server, 0x20); again: if (have_ip) ip = dest_ip; - else ip = ipzero; + else + zero_ip(&ip); DEBUG(3,("Connecting to host=%s\\share=%s\n\n", server, "IPC$")); @@ -1276,7 +1276,7 @@ int main(int argc,char *argv[]) }; got_pass = 0; - dest_ip = ipzero; + zero_ip(&dest_ip); dbf = x_stdout; @@ -1291,7 +1291,7 @@ int main(int argc,char *argv[]) break; case 'I': dest_ip = *interpret_addr2(poptGetOptArg(pc)); - if (zero_ip(dest_ip)) + if (is_zero_ip(dest_ip)) d_printf(ERRMSG_INVALID_IPADDRESS); else have_ip = True; -- cgit