]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Reformat
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 17 Jan 2023 14:10:58 +0000 (15:10 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 18 Jan 2023 12:23:12 +0000 (13:23 +0100)
pdns/logger.hh
pdns/recursordist/syncres.cc

index 88e45eb6f7f01b6395d9767768f902e49855b041..2f24bdf9cd54c71d9dcd8f685e10edb9cb5333f4 100644 (file)
@@ -171,7 +171,8 @@ Logger& getLogger();
 // (trace-regexp). We feed an OptLog object to the code that should not know anything about this
 // That code shold then log using VLOG
 
-struct LogVariant {
+struct LogVariant
+{
   string prefix;
   // variant cannot hold references
   std::variant<Logger*, ostringstream*> v;
@@ -183,14 +184,13 @@ using OptLog = std::optional<LogVariant>;
 // Originally there was a flag but is was never set from !RECURSOR
 #define VLOG(log, x) #error VLOG only works in recursor
 #else
-#define VLOG(log, x)                                                    \
-  if (log) {                                                            \
-    if (std::holds_alternative<Logger*>((log)->v)) {                    \
+#define VLOG(log, x)                                                       \
+  if (log) {                                                               \
+    if (std::holds_alternative<Logger*>((log)->v)) {                       \
       *std::get<Logger*>(log->v) << Logger::Warning << (log)->prefix << x; \
-    }                                                                   \
-    else if (std::holds_alternative<ostringstream*>((log)->v)) {        \
-      *std::get<ostringstream*>((log)->v) << (log)->prefix << x;        \
-    }                                                                   \
+    }                                                                      \
+    else if (std::holds_alternative<ostringstream*>((log)->v)) {           \
+      *std::get<ostringstream*>((log)->v) << (log)->prefix << x;           \
+    }                                                                      \
   }
 #endif
-
index 8f4b7b7390500e8d6f8f67333e796faac96b0212..0e0b95e5d5ca378e0061621e3d87f6fae2a0b5ec 100644 (file)
@@ -469,12 +469,12 @@ bool SyncRes::s_save_parent_ns_set;
 unsigned int SyncRes::s_max_busy_dot_probes;
 bool SyncRes::s_addExtendedResolutionDNSErrors;
 
-#define LOG(x)                                  \
-  if (d_lm == Log) {                            \
-    g_log << Logger::Warning << x;              \
-  }                                             \
-  else if (d_lm == Store) {                     \
-    d_trace << x;                               \
+#define LOG(x)                     \
+  if (d_lm == Log) {               \
+    g_log << Logger::Warning << x; \
+  }                                \
+  else if (d_lm == Store) {        \
+    d_trace << x;                  \
   }
 
 OptLog SyncRes::LogObject(const string& prefix)
@@ -483,7 +483,7 @@ OptLog SyncRes::LogObject(const string& prefix)
   if (d_lm == Log) {
     ret = {prefix, &g_log};
   }
-  else if(d_lm == Store) {
+  else if (d_lm == Store) {
     ret = {prefix, &d_trace};
   }
   return ret;