]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Drop Ip::Address(Ip::Address *) constructor entirely
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 4 Jun 2013 05:12:39 +0000 (23:12 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 4 Jun 2013 05:12:39 +0000 (23:12 -0600)
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.

src/ip/Address.cc
src/ip/Address.h
src/log/ModUdp.cc

index 8ef6084480a9135b58cd326beb80abaf3ddb13fa..6dbd1512e13cb99ec980c48e229027883cccaac7 100644 (file)
@@ -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();
index c2a42dc0bac3f81a71c5e56bccaeeee47166fcd9..680e6e225a72e68ac56e16f501643367e0fbfc87 100644 (file)
@@ -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 &);
index a4a622cca0b584fc80cfa49a75f001a5958f8cf1..9191ad93d0432cab4701c9f4056b3bc383f40351 100644 (file)
@@ -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 {