]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Changed HERE macro to be a true nop, clarified documentation, and marked is as deprec...
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 12 Nov 2012 13:11:36 +0000 (14:11 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 12 Nov 2012 13:11:36 +0000 (14:11 +0100)
Fixed syntax bug in comm.cc unearthed by the macro-to-function change.

src/Debug.h
src/comm.cc

index a117d85f42ac4af6186c33689be48bd4c91970db..3df1cfc0defe0f666fa7ffb16b99bca8a86a097f 100644 (file)
@@ -115,13 +115,20 @@ const char * SkipBuildPrefix(const char* path);
         } \
    } while (/*CONSTCOND*/ 0)
 
-/*
- * HERE is a macro that you can use like this:
+/** stream manipulator which does nothing.
+ * \deprecated Do not add to new code, and remove when editing old code
  *
+ * Its purpose is to inactivate calls made following previous debugs()
+ * guidelines such as
  * debugs(1,2, HERE << "some message");
+ *
+ * His former objective is now absorbed in the debugs call itself
  */
-//TODO: just before branching Squid 3.4, blanket-remove HERE from the source
-#define HERE ""
+inline std::ostream&
+HERE(std::ostream& s)
+{
+    return s;
+}
 
 /*
  * MYNAME is for use at debug levels 0 and 1 where HERE is too messy.
index 9412564c2412101e63f6bfb472be75b254fa8580..5a87c69189b45e9d2b45f218b0f2d185e294205d 100644 (file)
@@ -2135,7 +2135,7 @@ comm_open_uds(int sock_type,
         return -1;
     }
 
-    debugs(50, 3, HERE "Opened UDS FD " << new_socket << " : family=" << AI.ai_family << ", type=" << AI.ai_socktype << ", protocol=" << AI.ai_protocol);
+    debugs(50, 3, "Opened UDS FD " << new_socket << " : family=" << AI.ai_family << ", type=" << AI.ai_socktype << ", protocol=" << AI.ai_protocol);
 
     /* update fdstat */
     debugs(50, 5, HERE << "FD " << new_socket << " is a new socket");