From 40465477e245a50d2e140f32bdb617cb0b21a8b9 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 9 May 2022 18:20:01 -0700 Subject: [PATCH] gvgen: abbreviate setting 'type' in 'makeRandom' --- cmd/tools/graph_generator.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/tools/graph_generator.c b/cmd/tools/graph_generator.c index f72bb6161..f7ef6f417 100644 --- a/cmd/tools/graph_generator.c +++ b/cmd/tools/graph_generator.c @@ -475,10 +475,7 @@ void makeRandom(int h, int w, edgefn ef) int i, j, type, size, depth; srand((unsigned)time(0)); - if (rand()%2==1) - type = 1; - else - type = 0; + type = rand() % 2; size = depth = 0; while (size <= h) { -- 2.40.0