Fix issue where hash might not be quite initialized. Also remove redundant bit to...
[awesomized/libmemcached] / libmemcached / protocol / pedantic.c
index d6304396b3708a710954e20786e73bfd1e5954ce..ac16099ea10a4755425d40c5f49d303a0284276b 100644 (file)
@@ -2,12 +2,11 @@
 #include "libmemcached/protocol/common.h"
 
 #include <sys/types.h>
-#include <netinet/in.h>
 #include <inttypes.h>
 
 #define ensure(a) if (!(a)) { return false; }
 
-bool memcached_binary_protocol_pedantic_check_request(protocol_binary_request_header *request)
+bool memcached_binary_protocol_pedantic_check_request(const protocol_binary_request_header *request)
 {
   ensure(request->request.magic == PROTOCOL_BINARY_REQ);
   ensure(request->request.datatype == PROTOCOL_BINARY_RAW_BYTES);
@@ -99,8 +98,8 @@ bool memcached_binary_protocol_pedantic_check_request(protocol_binary_request_he
   return true;
 }
 
-bool memcached_binary_protocol_pedantic_check_response(protocol_binary_request_header *request,
-                                                       protocol_binary_response_header *response)
+bool memcached_binary_protocol_pedantic_check_response(const protocol_binary_request_header *request,
+                                                       const protocol_binary_response_header *response)
 {
   ensure(response->response.magic == PROTOCOL_BINARY_RES);
   ensure(response->response.datatype == PROTOCOL_BINARY_RAW_BYTES);