From cdbd5e6fcf1f447b515e717f7d7194471ef714a7 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 23 Nov 2023 13:35:57 -0500 Subject: ctx: Switch paths from darray to RESERVE() --- src/ctx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ctx.c') diff --git a/src/ctx.c b/src/ctx.c index 692f5c5..f5dc465 100644 --- a/src/ctx.c +++ b/src/ctx.c @@ -4,7 +4,6 @@ #include "ctx.h" #include "alloc.h" #include "color.h" -#include "darray.h" #include "diag.h" #include "expr.h" #include "mtab.h" @@ -242,10 +241,10 @@ int bfs_ctx_free(struct bfs_ctx *ctx) { free_colors(ctx->colors); - for (size_t i = 0; i < darray_length(ctx->paths); ++i) { + for (size_t i = 0; i < ctx->npaths; ++i) { free((char *)ctx->paths[i]); } - darray_free(ctx->paths); + free(ctx->paths); free(ctx->argv); free(ctx); -- cgit v1.2.3