[Telepathy-commits] [telepathy-qt4/master] TpPrototype::PresenceManager: don't check unsigned < 0

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Jan 8 07:39:00 PST 2009


Presumably the intention was to check for zero (which is the "null value"
for handles), so let's do that instead.
---
 TelepathyQt4/Prototype/PresenceManager.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/TelepathyQt4/Prototype/PresenceManager.cpp b/TelepathyQt4/Prototype/PresenceManager.cpp
index 7c19465..eba47a5 100644
--- a/TelepathyQt4/Prototype/PresenceManager.cpp
+++ b/TelepathyQt4/Prototype/PresenceManager.cpp
@@ -87,7 +87,7 @@ public:
     uint localHandle()
     {
         uint self_handle = ConnectionFacade::instance()->selfHandleForConnectionInterface( m_pConnectionInterface );
-        if ( self_handle < 0 )
+        if ( self_handle == 0 )
         { m_isValid = false; }
     
         return self_handle;
-- 
1.5.6.5




More information about the Telepathy-commits mailing list