]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2369] Initialize buffer_pos_ with 0
authorMukund Sivaraman <muks@isc.org>
Thu, 1 Nov 2012 04:21:49 +0000 (09:51 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 1 Nov 2012 04:23:32 +0000 (09:53 +0530)
This is equivalent code to the former. The former was written such to
drive the point that buffer_pos_ is by default pointing at the end of
the buffer_ vector.  At construction, the buffer_ vector is empty, so
both work.

src/lib/dns/master_lexer_inputsource.cc

index d3570d5873f2bf294d5c7c79abed6becc1209037..cd23d9cad49abce5842a673f786687dce2436b60 100644 (file)
@@ -33,7 +33,7 @@ InputSource::InputSource(std::istream& input_stream) :
     at_eof_(false),
     line_(1),
     saved_line_(line_),
-    buffer_pos_(buffer_.size()),
+    buffer_pos_(0),
     name_(createStreamName(input_stream)),
     input_(input_stream)
 {}
@@ -42,7 +42,7 @@ InputSource::InputSource(const char* filename) :
     at_eof_(false),
     line_(1),
     saved_line_(line_),
-    buffer_pos_(buffer_.size()),
+    buffer_pos_(0),
     name_(filename),
     input_(file_stream_)
 {