]> granicus.if.org Git - pdns/commitdiff
auth: Use the correct type while reading from the control channel
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 29 May 2019 13:46:53 +0000 (15:46 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 29 May 2019 13:46:53 +0000 (15:46 +0200)
pdns/dynlistener.cc

index c592b7cc31ae31a59035a3eee29e15d87e48287e..c3a1dc7e3e34245c81b98a7a1de4e0d9709b10d9 100644 (file)
@@ -221,7 +221,7 @@ string DynListener::getLine()
   vector<char> mesg;
   mesg.resize(1024000);
 
-  int len;
+  ssize_t len;
 
   ComboAddress remote;
   socklen_t remlen=remote.getSocklen();
@@ -284,12 +284,12 @@ string DynListener::getLine()
     else if(len==0)
       throw PDNSException("Guardian exited - going down as well");
 
-    if(len == (int)mesg.size())
+    if(static_cast<size_t>(len) == mesg.size())
       throw PDNSException("Line on control console was too long");
 
     mesg[len]=0;
   }
-  
+
   return &mesg[0];
 }