From: Amos Jeffries Date: Tue, 4 Jun 2013 05:12:39 +0000 (-0600) Subject: Drop Ip::Address(Ip::Address *) constructor entirely X-Git-Tag: SQUID_3_4_0_1~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db772b664044657571dda32c3dc85b3089d093b5;p=thirdparty%2Fsquid.git Drop Ip::Address(Ip::Address *) constructor entirely Has been deprecated for a while and appears to no longer be required by any of the current code. The reference& copy-constructor can easily be used in its place. --- diff --git a/src/ip/Address.cc b/src/ip/Address.cc index 8ef6084480..6dbd1512e1 100644 --- a/src/ip/Address.cc +++ b/src/ip/Address.cc @@ -465,15 +465,6 @@ Ip::Address::Address(const Ip::Address &s) operator=(s); } -#if 0 -Ip::Address::Address(Ip::Address *s) -{ - setEmpty(); - if (s) - memcpy(this, s, sizeof(Ip::Address)); -} -#endif - Ip::Address::Address(const struct hostent &s) { setEmpty(); diff --git a/src/ip/Address.h b/src/ip/Address.h index c2a42dc0ba..680e6e225a 100644 --- a/src/ip/Address.h +++ b/src/ip/Address.h @@ -47,16 +47,6 @@ public: /*@{*/ Address() { setEmpty(); } Address(const Ip::Address &); - - /** - * This constructor takes its own copy of the object pointed to for memory-safe usage later. - * The caller must itself perform and ptr memory-management needed. - * - \deprecated Use of pointers can be nasty. Consider this a last-resort. - * Prefer the by-reference (&) version instead. - */ - Address(Address *); - Address(const struct in_addr &); Address(const struct sockaddr_in &); Address(const struct in6_addr &); diff --git a/src/log/ModUdp.cc b/src/log/ModUdp.cc index a4a622cca0..9191ad93d0 100644 --- a/src/log/ModUdp.cc +++ b/src/log/ModUdp.cc @@ -197,7 +197,7 @@ logfile_mod_udp_open(Logfile * lf, const char *path, size_t bufsz, int fatal_fla debugs(50, DBG_IMPORTANT, "Unable to open UDP socket for logging"); return FALSE; } - } else if (!comm_connect_addr(ll->fd, &addr)) { + } else if (!comm_connect_addr(ll->fd, addr)) { if (lf->flags.fatal) { fatalf("Unable to connect to %s for UDP log: %s\n", lf->path, xstrerror()); } else {