]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1452] use sizeof(uint16_t) instead of a magic number '2'
authorJINMEI Tatuya <jinmei@isc.org>
Fri, 16 Dec 2011 22:27:11 +0000 (14:27 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Fri, 16 Dec 2011 22:27:11 +0000 (14:27 -0800)
src/lib/util/io/socketsession.cc

index 758a6e7d624cfbb9611f6e2b81f2f45f422a69e9..969f8fb943c4c306cb8a7b278ee07fe8c449a5af 100644 (file)
@@ -50,7 +50,7 @@ using namespace internal;
 // 6 32-bit fields, and 2 sockaddr structure. (see the SocketSessionUtility
 // overview description in the header file).  sizeof sockaddr_storage
 // should be the possible max of any sockaddr structure
-const size_t DEFAULT_HEADER_BUFLEN = 2 + sizeof(uint32_t) * 6 +
+const size_t DEFAULT_HEADER_BUFLEN = sizeof(uint16_t) + sizeof(uint32_t) * 6 +
     sizeof(struct sockaddr_storage) * 2;
 
 // The allowable maximum size of data passed with the socket FD.  For now