summaryrefslogtreecommitdiff
path: root/src/decoder.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-03-13 16:00:57 +0100
committerMartin Sustrik <sustrik@250bpm.com>2012-03-13 16:00:57 +0100
commitd6d396790754dc03bfbde4d957c31e2170151bfd (patch)
tree3919784bf39b2e4c6bfc90960386fda3e5d79483 /src/decoder.cpp
parentb871611cc36eaaf740a5c8f476cf53fe40299eb3 (diff)
Type of XS_MAXMSGSIZE changed to uint64_t
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/decoder.cpp')
-rw-r--r--src/decoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder.cpp b/src/decoder.cpp
index a7f669a..23546f1 100644
--- a/src/decoder.cpp
+++ b/src/decoder.cpp
@@ -28,7 +28,7 @@
#include "wire.hpp"
#include "err.hpp"
-xs::decoder_t::decoder_t (size_t bufsize_, int64_t maxmsgsize_) :
+xs::decoder_t::decoder_t (size_t bufsize_, uint64_t maxmsgsize_) :
decoder_base_t <decoder_t> (bufsize_),
session (NULL),
maxmsgsize (maxmsgsize_)
@@ -70,7 +70,7 @@ bool xs::decoder_t::one_byte_size_ready ()
// close it before calling xs_msg_init_size, however, it's a 0-byte
// message and thus we can treat it as uninitialised...
int rc;
- if (maxmsgsize >= 0 && (int64_t) (*tmpbuf - 1) > maxmsgsize) {
+ if (maxmsgsize >= 0 && (uint64_t) (*tmpbuf - 1) > maxmsgsize) {
rc = -1;
errno = ENOMEM;
}
@@ -105,7 +105,7 @@ bool xs::decoder_t::eight_byte_size_ready ()
// close it before calling xs_msg_init_size, however, it's a 0-byte
// message and thus we can treat it as uninitialised...
int rc;
- if (maxmsgsize >= 0 && (int64_t) (size - 1) > maxmsgsize) {
+ if (maxmsgsize >= 0 && (uint64_t) (size - 1) > maxmsgsize) {
rc = -1;
errno = ENOMEM;
}