From 956b4413f7f7c632d87962432f06c8f8214112ef Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Thu, 4 Jul 2024 08:02:33 +0530 Subject: solver_greedy: clean up --- src/solver_greedy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/solver_greedy.c b/src/solver_greedy.c index 215f678..d3dbb8f 100644 --- a/src/solver_greedy.c +++ b/src/solver_greedy.c @@ -65,9 +65,8 @@ int solver_greedy(struct job_clist *q, int32_t *max_build, struct job **job) if (conformity_cur > conformity_max) { conformity_max = conformity_cur; selected = j; - } - if (conformity_cur == conformity_max && - selected->deps_filled > j->deps_filled) { + } else if (conformity_cur == conformity_max && + selected->deps_filled > j->deps_filled) { selected = j; } } -- cgit v1.2.3