]> granicus.if.org Git - pdns/commitdiff
Renamed strtoui to pdns_strtoui, requested by @ahu
authorAki Tuomi <cmouse@desteem.org>
Tue, 4 Nov 2014 08:44:58 +0000 (10:44 +0200)
committerAki Tuomi <cmouse@desteem.org>
Tue, 4 Nov 2014 08:44:58 +0000 (10:44 +0200)
pdns/dns.cc
pdns/misc.cc
pdns/misc.hh
pdns/rcpgenerator.cc

index d1683519217ce3f9891c06bcfcb419cc5a742185..42a3cafcd641743bb44e7a4c9aba228acde75383 100644 (file)
@@ -197,7 +197,7 @@ void fillSOAData(const string &content, SOAData &data)
   if(pleft>1) 
     data.hostmaster=attodot(parts[1]); // ahu@ds9a.nl -> ahu.ds9a.nl, piet.puk@ds9a.nl -> piet\.puk.ds9a.nl
 
-  data.serial = pleft > 2 ? strtoui(parts[2].c_str(), NULL, 10) : 0;
+  data.serial = pleft > 2 ? pdns_strtoui(parts[2].c_str(), NULL, 10) : 0;
   if (data.serial == UINT_MAX && errno == ERANGE) throw PDNSException("serial number too large in '"+parts[2]+"'");
 
   data.refresh = pleft > 3 ? atoi(parts[3].c_str())
index bc063f66da73316473486f7628bbd3d10b1344b2..af5d89cdb9a95ea4eca1d0d35eaddbdd026c93e8 100644 (file)
@@ -917,7 +917,7 @@ void setSocketTimestamps(int fd)
 #endif
 }
 
-uint32_t strtoui(const char *nptr, char **endptr, int base)
+uint32_t pdns_strtoui(const char *nptr, char **endptr, int base)
 {
   unsigned long val = strtoul(nptr, endptr, base);
   if (val > UINT_MAX) {
index d760f6b9a8b0c40e1fbf6edcd5e89d6e2a5b5d5e..803532df6ef2724cc2fad4b0cde0d0a3f3976b3e 100644 (file)
@@ -87,7 +87,7 @@ uint16_t getShort(const unsigned char *p);
 uint16_t getShort(const char *p);
 uint32_t getLong(const unsigned char *p);
 uint32_t getLong(const char *p);
-uint32_t strtoui(const char *nptr, char **endptr, int base);
+uint32_t pdns_strtoui(const char *nptr, char **endptr, int base);
 
 int logFacilityToLOG(unsigned int facility);
 
index a5b04c4e5d76b433244a1af5d5738ef42a194219..b088b100e9f9ecee37608b182169f5aa10effe89 100644 (file)
@@ -62,7 +62,7 @@ void RecordTextReader::xfr32BitInt(uint32_t &val)
     throw RecordTextException("expected digits at position "+lexical_cast<string>(d_pos)+" in '"+d_string+"'");
 
   char *endptr;
-  unsigned long ret=strtoui(d_string.c_str() + d_pos, &endptr, 10);
+  unsigned long ret=pdns_strtoui(d_string.c_str() + d_pos, &endptr, 10);
   if (ret == UINT_MAX && errno == ERANGE) throw RecordTextException("serial number too large in '"+d_string+"'");
   val=ret;