]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1774] Use uint8_t for name offsets
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 28 Jun 2012 02:34:39 +0000 (08:04 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 28 Jun 2012 02:34:39 +0000 (08:04 +0530)
src/lib/dns/name.cc
src/lib/dns/name.h

index 0a92d290deba7d5026f16e65fec05708248cd077..7e2ed4c962dce5e82c3740a19ceb04472ab0e1e3 100644 (file)
@@ -147,7 +147,7 @@ Name::Name(const std::string &namestring, bool downcase) {
     bool is_root = false;
     ft_state state = ft_init;
 
-    std::vector<unsigned char> offsets;
+    std::vector<uint8_t> offsets;
     offsets.reserve(Name::MAX_LABELS);
     offsets.push_back(0);
 
@@ -310,7 +310,7 @@ typedef enum {
 }
 
 Name::Name(InputBuffer& buffer, bool downcase) {
-    std::vector<unsigned char> offsets;
+    std::vector<uint8_t> offsets;
     offsets.reserve(Name::MAX_LABELS);
 
     /*
@@ -663,8 +663,8 @@ Name::reverse() const {
     retname.ndata_.reserve(length_);
 
     // Copy the original name, label by label, from tail to head.
-    vector<unsigned char>::const_reverse_iterator rit0 = offsets_.rbegin();
-    vector<unsigned char>::const_reverse_iterator rit1 = rit0 + 1;
+    vector<uint8_t>::const_reverse_iterator rit0 = offsets_.rbegin();
+    vector<uint8_t>::const_reverse_iterator rit1 = rit0 + 1;
     NameString::const_iterator n0 = ndata_.begin();
     retname.offsets_.push_back(0);
     while (rit1 != offsets_.rend()) {
index 84c243a21cd2999b7d53a4a1dea19208cbdb2f4a..5ad0ba9f81908ae3d58ebf21055c260db6d320b1 100644 (file)
@@ -683,7 +683,7 @@ public:
 
 private:
     NameString ndata_;
-    std::vector<unsigned char> offsets_;
+    std::vector<uint8_t> offsets_;
     unsigned int length_;
     unsigned int labelcount_;
 };