From eb4ae95bbf89444e56ebb3050e79f305b335d369 Mon Sep 17 00:00:00 2001 From: Otavio Pontes Date: Thu, 7 Mar 2019 13:38:53 -0800 Subject: [PATCH] Remove unecessary srand() calls We don't use rand() in swupd so don't need to initialize the random generator. This was a leftover from previous code that used rand() for tests purposes. Signed-off-by: Otavio Pontes --- src/bundle.c | 2 -- src/update.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/bundle.c b/src/bundle.c index f4c4a78e..05cf2a75 100644 --- a/src/bundle.c +++ b/src/bundle.c @@ -688,8 +688,6 @@ int add_subscriptions(struct list *bundles, struct list **subs, struct manifest struct list *iter; struct manifest *manifest; - srand(time(NULL)); - iter = list_head(bundles); while (iter) { bundle = iter->data; diff --git a/src/update.c b/src/update.c index 4e376bdc..74bf999a 100644 --- a/src/update.c +++ b/src/update.c @@ -240,8 +240,6 @@ static enum swupd_code main_update() bool re_update = false; bool versions_match = false; - srand(time(NULL)); - ret = swupd_init(); if (ret != 0) { /* being here means we already close log by a previously caught error */