From 0074499d7a78bfc69c210acfbb2be820c27a45ad Mon Sep 17 00:00:00 2001 From: Daniel Pointon Date: Wed, 27 Mar 2024 14:38:47 +0000 Subject: [PATCH] fix coverage --- src/cliques.c | 4 ++-- src/homos.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cliques.c b/src/cliques.c index 617947fea..499b096fc 100644 --- a/src/cliques.c +++ b/src/cliques.c @@ -219,8 +219,8 @@ static bool init_data_from_args(Obj digraph_obj, Obj max_obj, Obj* group, CliqueData* data) { - if (DigraphNrVertices(digraph_obj) + 1 > CLIQUES_STRUCTURE_SIZE - || !is_initialized) { + if (!is_initialized + || DigraphNrVertices(digraph_obj) + 1 > CLIQUES_STRUCTURE_SIZE) { free_cliques_data(data); is_initialized = true; CLIQUES_STRUCTURE_SIZE = DigraphNrVertices(digraph_obj) + 1; diff --git a/src/homos.c b/src/homos.c index 8658bd3dc..05168d932 100644 --- a/src/homos.c +++ b/src/homos.c @@ -1643,7 +1643,7 @@ static bool init_data_from_args(Obj digraph1_obj, Obj aut_grp_obj) { uint16_t calculated_max_verts = MAX(DigraphNrVertices(digraph1_obj), DigraphNrVertices(digraph2_obj)); - if ((calculated_max_verts > HOMOS_STRUCTURE_SIZE) || !is_initialized) { + if (!is_initialized || (calculated_max_verts > HOMOS_STRUCTURE_SIZE)) { free_homos_data(); is_initialized = true;