]> granicus.if.org Git - pdns/commitdiff
Use pdns_stou in odbxbackend
authorAki Tuomi <cmouse@desteem.org>
Fri, 11 Dec 2015 14:49:43 +0000 (16:49 +0200)
committerAki Tuomi <cmouse@desteem.org>
Mon, 21 Dec 2015 12:52:32 +0000 (14:52 +0200)
modules/opendbxbackend/odbxbackend.cc

index ea2f59e137231370e29d2a1efc56651dfd9a296c..372715a2c588da91c9bc77f68a0551f20304efeb 100644 (file)
@@ -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);