From 579c61f5def744098ce622b831a60bc8b5f460dd Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Wed, 22 Jan 2014 13:13:17 +0200 Subject: [PATCH] Fix comparison between signed/unsigned --- modules/opendbxbackend/odbxbackend.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/opendbxbackend/odbxbackend.cc b/modules/opendbxbackend/odbxbackend.cc index 2a3764314..1361dd2d1 100644 --- a/modules/opendbxbackend/odbxbackend.cc +++ b/modules/opendbxbackend/odbxbackend.cc @@ -248,7 +248,7 @@ bool OdbxBackend::list( const string& target, int zoneid ) return false; } - if( len > sizeof( m_buffer ) - 1 ) + if( len > static_cast(sizeof( m_buffer )) - 1 ) { L.log( m_myname + " list: Unable to convert zone id to string - insufficient buffer space", Logger::Error ); return false; @@ -310,7 +310,7 @@ void OdbxBackend::lookup( const QType& qtype, const string& qname, DNSPacket* dn throw( DBException( "Error: Libc error" ) ); } - if( len > sizeof( m_buffer ) - 1 ) + if( len > static_cast(sizeof( m_buffer )) - 1 ) { L.log( m_myname + " lookup: Unable to convert zone id to string - insufficient buffer space", Logger::Error ); throw( DBException( "Error: Libc error" ) ); @@ -420,7 +420,7 @@ void OdbxBackend::setFresh( uint32_t domain_id ) throw( DBException( "Error: Libc error" ) ); } - if( len > sizeof( m_buffer ) - 1 ) + if( len > static_cast(sizeof( m_buffer )) - 1 ) { L.log( m_myname + " setFresh: Unable to insert values into statement '" + getArg( "sql-update-lastcheck" ) + "' - insufficient buffer space", Logger::Error ); throw( DBException( "Error: Libc error" ) ); @@ -460,7 +460,7 @@ void OdbxBackend::setNotified( uint32_t domain_id, uint32_t serial ) throw( DBException( "Error: Libc error" ) ); } - if( len > sizeof( m_buffer ) - 1 ) + if( len > static_cast(sizeof( m_buffer )) - 1 ) { L.log( m_myname + " setNotified: Unable to insert values into statement '" + getArg( "sql-update-serial" ) + "' - insufficient buffer space", Logger::Error ); throw( DBException( "Error: Libc error" ) ); @@ -626,7 +626,7 @@ bool OdbxBackend::createSlaveDomain( const string& ip, const string& domain, con return false; } - if( len > sizeof( m_buffer ) - 1 ) + if( len > static_cast(sizeof( m_buffer )) - 1 ) { L.log( m_myname + " createSlaveDomain: Unable to insert values in statement '" + getArg( "sql-insert-slave" ) + "' - insufficient buffer space", Logger::Error ); return false; @@ -668,7 +668,7 @@ bool OdbxBackend::feedRecord( const DNSResourceRecord& rr, string *ordername ) return false; } - if( len > sizeof( m_buffer ) - 1 ) + if( len > static_cast(sizeof( m_buffer )) - 1 ) { L.log( m_myname + " feedRecord: Unable to insert values in statement '" + getArg( "sql-insert-record" ) + "' - insufficient buffer space", Logger::Error ); return false; @@ -709,7 +709,7 @@ bool OdbxBackend::startTransaction( const string& domain, int zoneid ) return false; } - if( len > sizeof( m_buffer ) - 1 ) + if( len > static_cast(sizeof( m_buffer )) - 1 ) { L.log( m_myname + " startTransaction: Unable to convert zone id to string - insufficient buffer space", Logger::Error ); return false; -- 2.40.0