From db5b684f4954eb10748adbbbf06bc5f461406627 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Sat, 12 Dec 2015 22:56:47 +0200 Subject: [PATCH] Remove pdns_strtoui --- pdns/misc.cc | 14 -------------- pdns/misc.hh | 1 - 2 files changed, 15 deletions(-) diff --git a/pdns/misc.cc b/pdns/misc.cc index a7b18c90e..9c3e33c65 100644 --- a/pdns/misc.cc +++ b/pdns/misc.cc @@ -1042,20 +1042,6 @@ bool setSocketTimestamps(int fd) return true; // we pretend this happened. } -uint32_t pdns_strtoui(const char *nptr, char **endptr, int base) -{ -#if ULONG_MAX == 4294967295 - return strtoul(nptr, endptr, base); -#else - unsigned long val = strtoul(nptr, endptr, base); - if (val > UINT_MAX) { - errno = ERANGE; - return UINT_MAX; - } - - return val; -#endif -} bool setNonBlocking(int sock) { int flags=fcntl(sock,F_GETFL,0); diff --git a/pdns/misc.hh b/pdns/misc.hh index 14b887b95..260ee7c36 100644 --- a/pdns/misc.hh +++ b/pdns/misc.hh @@ -70,7 +70,6 @@ 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 pdns_strtoui(const char *nptr, char **endptr, int base); bool getTSIGHashEnum(const DNSName& algoName, TSIGHashEnum& algoEnum); DNSName getTSIGAlgoName(TSIGHashEnum& algoEnum); -- 2.40.0