From 8d173710fe8cfd96bd54f9dd1cf0eccacfdd6e73 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 3 Apr 2025 15:19:59 -0400 Subject: Deprecate heap_strf --- src/stdlib/paths.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stdlib/paths.c') diff --git a/src/stdlib/paths.c b/src/stdlib/paths.c index 3f27aef7..7a5346f5 100644 --- a/src/stdlib/paths.c +++ b/src/stdlib/paths.c @@ -17,7 +17,6 @@ #include #include -#include "print.h" #include "arrays.h" #include "enums.h" #include "files.h" @@ -28,6 +27,7 @@ #include "text.h" #include "types.h" #include "util.h" +#include "print.h" // Use inline version of the siphash code for performance: #include "siphash.h" @@ -491,7 +491,7 @@ static Array_t _filtered_children(Path_t path, bool include_hidden, mode_t filte if (streq(dir->d_name, ".") || streq(dir->d_name, "..")) continue; - const char *child_str = heap_strf("%.*s/%s", path_len, path_str, dir->d_name); + const char *child_str = String(string_slice(path_str, path_len), "/", dir->d_name); struct stat sb; if (stat(child_str, &sb) != 0) continue; -- cgit v1.2.3