aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Riehs <tristan.riehs@inria.fr>2025-12-29 16:15:08 +0100
committerTristan Riehs <tristan.riehs@inria.fr>2025-12-29 16:15:08 +0100
commitfbb3fb48e43507a6a5d5a4638b7df5661b1804ad (patch)
tree33efa560d2c3c5e07337a33e09d81317f8bf5c4d /src
parent91412aa51ebaa95f2e065194fe90a5b12694b1de (diff)
Use strbuild a few more times
Diffstat (limited to 'src')
-rw-r--r--src/main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 4a94108..2156e1b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -263,13 +263,11 @@ static void ftag_export(int argc, char **argv)
char *archive_dir = argv[0];
char archive_file[64];
- strcpy(archive_file, archive_dir);
- strcat(archive_file, ".tar.gz");
+ strbuild(archive_file, "%s%s", archive_dir, ".tar.gz");
/* step 1: create temporary directory having the name of the archive */
char tmp_dir[64];
- strcpy(tmp_dir, "/tmp/");
- strcat(tmp_dir, archive_dir);
+ strbuild(tmp_dir, "/tmp/%s", archive_dir);
int rc = mkdir(tmp_dir, 0755);
if (rc == -1) {
fprintf(stderr, "mkdir: %s:", tmp_dir);