From: Remi Gacogne Date: Wed, 29 May 2019 13:46:53 +0000 (+0200) Subject: auth: Use the correct type while reading from the control channel X-Git-Tag: dnsdist-1.4.0-beta1~8^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=192a5a9be43875c2d9bf59c05af802ef7e16358a;p=thirdparty%2Fpdns.git auth: Use the correct type while reading from the control channel --- diff --git a/pdns/dynlistener.cc b/pdns/dynlistener.cc index c592b7cc31..c3a1dc7e3e 100644 --- a/pdns/dynlistener.cc +++ b/pdns/dynlistener.cc @@ -221,7 +221,7 @@ string DynListener::getLine() vector 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(len) == mesg.size()) throw PDNSException("Line on control console was too long"); mesg[len]=0; } - + return &mesg[0]; }