]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
comment nits
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 9 Nov 2015 10:33:10 +0000 (11:33 +0100)
committermind04 <mind04@monshouwer.org>
Sat, 25 Jun 2016 22:15:18 +0000 (00:15 +0200)
pdns/dnsname.cc
pdns/dnsname.hh
pdns/opensslsigners.cc
pdns/opensslsigners.hh

index 82bc2fe90ea2fda9c7ab9dc0242354979ab3b2ec..8c885a895a0681e580f5016d79b4a2c4b03ed623 100644 (file)
@@ -264,7 +264,7 @@ void DNSName::appendRawLabel(const char* start, unsigned int length)
     throw std::range_error("no such thing as an empty label to append");
   if(length > 63)
     throw std::range_error("label too long to append");
-  if(d_storage.size() + length > 254) // reserve two bytes, one for length and one for the root label
+  if(d_storage.size() + length > 254) // reserve one byte for the label length
     throw std::range_error("name too long to append");
 
   if(d_storage.empty()) {
@@ -283,7 +283,7 @@ void DNSName::prependRawLabel(const std::string& label)
     throw std::range_error("no such thing as an empty label to prepend");
   if(label.size() > 63)
     throw std::range_error("label too long to prepend");
-  if(d_storage.size() + label.size() > 254) // reserve two bytes, one for length and one for the root label
+  if(d_storage.size() + label.size() > 254) // reserve one byte for the label length
     throw std::range_error("name too long to prepend");
 
   if(d_storage.empty())
index f2311655abfa372a97894419c28b4f9ede49a3ac..be98100b8d0b6e757e682006bc188cad1517fc18 100644 (file)
@@ -78,7 +78,7 @@ public:
   }
   DNSName& operator+=(const DNSName& rhs)
   {
-    if(d_storage.size() + rhs.d_storage.size() > 256) // reserve one byte for the root label
+    if(d_storage.size() + rhs.d_storage.size() > 256) // one extra byte for the second root label
       throw std::range_error("name too long");
     if(rhs.empty())
       return *this;
index 3894cd7584e8b0113c91e3c3705e0c64126bf3a6..2381263ab956f87e06d99ff0d80b981af3bcc9ea 100644 (file)
@@ -12,6 +12,8 @@
 #include "dnssecinfra.hh"
 
 
+/* pthread locking */
+
 static pthread_mutex_t *openssllocks;
 
 extern "C" {
index 5f474b6c9388bc73d3990e5cf1a2b200187c965e..f7337c4a6a98e56b4929b77ef6438e7ab2e6b8a3 100644 (file)
@@ -8,4 +8,6 @@
 /* pthread locking */
 void openssl_thread_setup();
 void openssl_thread_cleanup();
+
+/* seeding PRNG */
 void openssl_seed();