summaryrefslogtreecommitdiffstats
path: root/fastlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-09-27 10:25:49 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-09-27 10:25:49 +0000
commit2c5b6196381b37a2a813f1592977a1b85a902093 (patch)
tree014f7bb96bcea7c315c4bfb20f2901f11bc44346 /fastlib
parentea9879e7d84c28bb670ef29bf3bdffa70e5109f2 (diff)
Do not do -1 on size
Diffstat (limited to 'fastlib')
-rw-r--r--fastlib/src/vespa/fastlib/net/httpheaderparser.cpp4
-rw-r--r--fastlib/src/vespa/fastlib/net/httpheaderparser.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/fastlib/src/vespa/fastlib/net/httpheaderparser.cpp b/fastlib/src/vespa/fastlib/net/httpheaderparser.cpp
index 360ac4fb0b5..929caa39011 100644
--- a/fastlib/src/vespa/fastlib/net/httpheaderparser.cpp
+++ b/fastlib/src/vespa/fastlib/net/httpheaderparser.cpp
@@ -81,8 +81,8 @@ Fast_HTTPHeaderParser::ReadHeader(const char *&name, const char *&value)
idx++;
}
- while (idx < (_bufferSize-1)) {
- size_t readLen = _input->ReadBufferFullUntil(&_lineBuffer[idx], _bufferSize - idx - 1, '\n');
+ while ((idx + 1) < _bufferSize) {
+ size_t readLen = _input->ReadBufferFullUntil(&_lineBuffer[idx], _bufferSize - idx, '\n');
if (readLen <= 0) {
return false;
}
diff --git a/fastlib/src/vespa/fastlib/net/httpheaderparser.h b/fastlib/src/vespa/fastlib/net/httpheaderparser.h
index 643d8252d52..59c5cb01f8a 100644
--- a/fastlib/src/vespa/fastlib/net/httpheaderparser.h
+++ b/fastlib/src/vespa/fastlib/net/httpheaderparser.h
@@ -2,8 +2,6 @@
#pragma once
-#include <vector>
-
class Fast_BufferedInputStream;
class Fast_HTTPHeaderParser