From 21df0d2776bf0cbef1674b3f2b152d42036bb1dd Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Fri, 11 Dec 2015 16:49:43 +0200 Subject: [PATCH] Use pdns_stou in odbxbackend --- modules/opendbxbackend/odbxbackend.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/opendbxbackend/odbxbackend.cc b/modules/opendbxbackend/odbxbackend.cc index ea2f59e13..372715a2c 100644 --- a/modules/opendbxbackend/odbxbackend.cc +++ b/modules/opendbxbackend/odbxbackend.cc @@ -666,12 +666,11 @@ bool OdbxBackend::feedRecord( const DNSResourceRecord& rr, string *ordername ) string tmp = rr.qname.toStringNoDot(); - int priority=0; + unsigned int priority=0; string content(rr.content); if(rr.qtype == QType::MX || rr.qtype == QType::SRV) { - priority=atoi(content.c_str()); - + priority=pdns_stou(content); string::size_type pos = content.find_first_not_of("0123456789"); if(pos != string::npos) boost::erase_head(content, pos); -- 2.40.0