summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/reds.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/reds.cpp b/server/reds.cpp
index 06702371..49113316 100644
--- a/server/reds.cpp
+++ b/server/reds.cpp
@@ -1781,7 +1781,7 @@ static void reds_handle_main_link(RedsState *reds, RedLinkInfo *link)
if (link_mess->connection_id == 0) {
reds_send_link_result(link, SPICE_LINK_ERR_OK);
- while((connection_id = rand()) == 0);
+ while((connection_id = g_random_int()) == 0);
mig_target = FALSE;
} else {
// TODO: make sure link_mess->connection_id is the same