]> source.dussan.org Git - tigervnc.git/commitdiff
[Cleanup] Fixed a compilation warning by removing a very doubtful optimization.
authorConstantin Kaplinsky <const@tightvnc.com>
Thu, 21 Aug 2008 05:51:29 +0000 (05:51 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Thu, 21 Aug 2008 05:51:29 +0000 (05:51 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2696 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/VNCServerST.cxx

index 06921e71a33211c4e2264936e2a4ee038b334d6a..0577d0563ec15d15cdc19ce34fe34fcc8a103aaf 100644 (file)
@@ -179,13 +179,8 @@ int VNCServerST::checkTimeouts()
   }
 
   int timeLeft;
-  time_t now;
+  time_t now = time(0);
 
-  // Optimization: Only call time() if using any maxTime. 
-  if (rfb::Server::maxDisconnectionTime || rfb::Server::maxConnectionTime || rfb::Server::maxIdleTime) {
-    now = time(0);
-  }
-  
   // Check MaxDisconnectionTime 
   if (rfb::Server::maxDisconnectionTime && clients.empty()) {
     if (now < lastDisconnectTime) {