]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/format/Format.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / format / Format.cc
index de62d545b48873ce064ec861ce3c384f46c17b57..4e47cc353ec0f65e7a82e936be1ef49a36928640 100644 (file)
@@ -1,5 +1,6 @@
 #include "squid.h"
 #include "AccessLogEntry.h"
+#include "client_side.h"
 #include "comm/Connection.h"
 #include "err_detail_type.h"
 #include "errorpage.h"
@@ -9,6 +10,7 @@
 #include "format/Token.h"
 #include "HttpRequest.h"
 #include "MemBuf.h"
+#include "protos.h"
 #include "rfc1738.h"
 #include "SquidTime.h"
 #include "Store.h"
@@ -16,7 +18,6 @@
 #include "ssl/ErrorDetail.h"
 #endif
 
-
 /// Convert a string to NULL pointer if it is ""
 #define strOrNull(s) ((s)==NULL||(s)[0]=='\0'?NULL:(s))
 
@@ -262,32 +263,40 @@ log_quoted_string(const char *str, char *out)
             break;
 
         case '\r':
-            *p++ = '\\';
-            *p++ = 'r';
-            str++;
+            *p = '\\';
+            ++p;
+            *p = 'r';
+            ++p;
+            ++str;
             break;
 
         case '\n':
-            *p++ = '\\';
-            *p++ = 'n';
-            str++;
+            *p = '\\';
+            ++p;
+            *p = 'n';
+            ++p;
+            ++str;
             break;
 
         case '\t':
-            *p++ = '\\';
-            *p++ = 't';
-            str++;
+            *p = '\\';
+            ++p;
+            *p = 't';
+            ++p;
+            ++str;
             break;
 
         default:
-            *p++ = '\\';
-            *p++ = *str;
-            str++;
+            *p = '\\';
+            ++p;
+            *p = *str;
+            ++p;
+            ++str;
             break;
         }
     }
 
-    *p++ = '\0';
+    *p = '\0';
 }
 
 void
@@ -431,7 +440,6 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
             doint = 1;
             break;
 
-
         case LFT_TIME_LOCALTIME:
 
         case LFT_TIME_GMT: {