]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ipc/TypedMsgHdr.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / ipc / TypedMsgHdr.cc
index 0f2116cc72d3e105ae4ccf86d491544e6aa06fb1..68e011064a96a45259942ae61646098626b9480d 100644 (file)
@@ -5,13 +5,13 @@
  *
  */
 
-
-#include "config.h"
-#include <string.h>
+#include "squid.h"
 #include "protos.h"
 #include "base/TextException.h"
 #include "ipc/TypedMsgHdr.h"
 
+#include <string.h>
+
 Ipc::TypedMsgHdr::TypedMsgHdr()
 {
     xmemset(this, 0, sizeof(*this));
@@ -60,8 +60,6 @@ void Ipc::TypedMsgHdr::sync()
     offset = 0;
 }
 
-
-
 int
 Ipc::TypedMsgHdr::type() const
 {
@@ -153,7 +151,6 @@ Ipc::TypedMsgHdr::putFixed(const void *raw, size_t size)
 void
 Ipc::TypedMsgHdr::getRaw(void *raw, size_t size) const
 {
-    Must(size >= 0);
     if (size > 0) {
         Must(size <= data.size - offset);
         memcpy(raw, data.raw + offset, size);
@@ -165,7 +162,6 @@ Ipc::TypedMsgHdr::getRaw(void *raw, size_t size) const
 void
 Ipc::TypedMsgHdr::putRaw(const void *raw, size_t size)
 {
-    Must(size >= 0);
     if (size > 0) {
         Must(size <= sizeof(data.raw) - data.size);
         memcpy(data.raw + data.size, raw, size);