changeset 435:708a15fdf791

Fix a type / conversion related warning.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 25 May 2012 20:21:45 +0300
parents 691400f1c9bb
children f8d6a720388a
files main.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Fri May 25 20:18:24 2012 +0300
+++ b/main.c	Fri May 25 20:21:45 2012 +0300
@@ -2274,7 +2274,7 @@
             time_t tmpTime = time(NULL);
             if (tmpTime - prevTime > SET_KEEPALIVE)
             {
-                int n = random() % th_llist_length(setIdleMessages);
+                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;