summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConstantin Kaplinsky <const@tightvnc.com>2008-08-21 05:51:29 +0000
committerConstantin Kaplinsky <const@tightvnc.com>2008-08-21 05:51:29 +0000
commit8499d0c60859328c927f1cb0fcd7b307fddff3c5 (patch)
tree3ade6d9e3f82d56b54bb4044481fdd5d4b540ac7
parentf0b3be7fa7d777e2938c82f8429798be35c28433 (diff)
downloadtigervnc-8499d0c60859328c927f1cb0fcd7b307fddff3c5.tar.gz
tigervnc-8499d0c60859328c927f1cb0fcd7b307fddff3c5.zip
[Cleanup] Fixed a compilation warning by removing a very doubtful optimization.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2696 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--common/rfb/VNCServerST.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index 06921e71..0577d056 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -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) {