changeset 502:52da406caf54

Rename some variables to be a bit more sane.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 01 Jun 2012 17:45:38 +0300
parents ca88945d8eda
children bac3f9af112c
files main.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Fri Jun 01 12:00:11 2012 +0300
+++ b/main.c	Fri Jun 01 17:45:38 2012 +0300
@@ -1346,7 +1346,7 @@
         exitProg = FALSE,
         colorSet = FALSE,
         insertMode = TRUE;
-    time_t prevTime;
+    time_t prevKeepAlive;
     char *tmpStr;
     nn_editbuf_t *editBuf = nn_editbuf_new(NN_TMPBUF_SIZE);
     nn_editbuf_t *histBuf[SET_MAX_HISTORY+2];
@@ -1575,8 +1575,8 @@
     nn_usercmd_init();
     
     // Initialize random numbers
-    prevTime = time(NULL);
-    srandom((int) prevTime);
+    prevKeepAlive = time(NULL);
+    srandom((int) prevKeepAlive);
 
     if (cursesInit)
     {
@@ -1785,7 +1785,7 @@
                         else
                         {
                             // Update time value of last sent message for unidle timeouts
-                            prevTime = time(NULL);
+                            prevKeepAlive = time(NULL);
                         }
 
                         updateMain = update = TRUE;
@@ -1954,12 +1954,12 @@
         if (++updateCount > 10)
         {
             time_t tmpTime = time(NULL);
-            if (tmpTime - prevTime > SET_KEEPALIVE)
+            if (tmpTime - prevKeepAlive > SET_KEEPALIVE)
             {
                 size_t n = ((size_t) random()) % th_llist_length(setIdleMessages);
                 qlist_t *node = th_llist_get_nth(setIdleMessages, n);
                 nn_conn_send_msg(conn, optUserNameEnc, node->data);
-                prevTime = tmpTime;
+                prevKeepAlive = tmpTime;
             }
 
             if (!colorSet)