From 35d0480f743abaa5c2c332f513043edd7c59081c Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 1 Nov 2024 00:55:19 -0400 Subject: Initialize structs to {0} and combine declaration and assignment where possible --- tests/test_conda.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/test_conda.c') diff --git a/tests/test_conda.c b/tests/test_conda.c index 84f98bc..63a2781 100644 --- a/tests/test_conda.c +++ b/tests/test_conda.c @@ -202,7 +202,11 @@ int main(int argc, char *argv[]) { test_delivery_gather_tool_versions, }; - const char *ws = "workspace"; + char ws[] = "workspace_XXXXXX"; + if (!mkdtemp(ws)) { + perror("mkdtemp"); + exit(1); + } getcwd(cwd_start, sizeof(cwd_start) - 1); mkdir(ws, 0755); chdir(ws); -- cgit