[svn] commit: r400 - /branches/jinmei-dnsmessageapi/src/lib/dns/cpp/name.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Dec 22 19:39:36 UTC 2009
Author: jinmei
Date: Tue Dec 22 19:39:35 2009
New Revision: 400
Log:
added explicit variable initialization to make some compilers happy
Modified:
branches/jinmei-dnsmessageapi/src/lib/dns/cpp/name.cc
Modified: branches/jinmei-dnsmessageapi/src/lib/dns/cpp/name.cc
==============================================================================
--- branches/jinmei-dnsmessageapi/src/lib/dns/cpp/name.cc (original)
+++ branches/jinmei-dnsmessageapi/src/lib/dns/cpp/name.cc Tue Dec 22 19:39:35 2009
@@ -253,7 +253,6 @@
Name::Name(InputBuffer& buffer, bool downcase)
{
- unsigned int new_current;
std::vector<unsigned char> offsets;
offsets.reserve(Name::MAX_LABELS);
@@ -274,6 +273,11 @@
unsigned int current = buffer.getPosition();
unsigned int pos_begin = current;
unsigned int biggest_pointer = current;
+
+ // Make the compiler happy; this is not required.
+ // XXX: bad style in that we initialize it with a dummy value and define
+ // it far from where it's used. But alternatives seemed even worse.
+ unsigned int new_current = 0;
//
// Note: The following code is not optimized for speed, but
More information about the bind10-changes
mailing list