Mercurial > hg > nnchat
comparison main.c @ 435:708a15fdf791
Fix a type / conversion related warning.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 25 May 2012 20:21:45 +0300 |
parents | 966c521e0954 |
children | f8d6a720388a |
comparison
equal
deleted
inserted
replaced
434:691400f1c9bb | 435:708a15fdf791 |
---|---|
2272 if (++updateCount > 10) | 2272 if (++updateCount > 10) |
2273 { | 2273 { |
2274 time_t tmpTime = time(NULL); | 2274 time_t tmpTime = time(NULL); |
2275 if (tmpTime - prevTime > SET_KEEPALIVE) | 2275 if (tmpTime - prevTime > SET_KEEPALIVE) |
2276 { | 2276 { |
2277 int n = random() % th_llist_length(setIdleMessages); | 2277 size_t n = ((size_t) random()) % th_llist_length(setIdleMessages); |
2278 qlist_t *node = th_llist_get_nth(setIdleMessages, n); | 2278 qlist_t *node = th_llist_get_nth(setIdleMessages, n); |
2279 nn_conn_send_msg(conn, optUserNameEnc, node->data); | 2279 nn_conn_send_msg(conn, optUserNameEnc, node->data); |
2280 prevTime = tmpTime; | 2280 prevTime = tmpTime; |
2281 } | 2281 } |
2282 | 2282 |