diff options
| author | Tristan Riehs <tristan.riehs@inria.fr> | 2025-12-29 16:15:08 +0100 |
|---|---|---|
| committer | Tristan Riehs <tristan.riehs@inria.fr> | 2025-12-29 16:15:08 +0100 |
| commit | fbb3fb48e43507a6a5d5a4638b7df5661b1804ad (patch) | |
| tree | 33efa560d2c3c5e07337a33e09d81317f8bf5c4d | |
| parent | 91412aa51ebaa95f2e065194fe90a5b12694b1de (diff) | |
Use strbuild a few more times
| -rw-r--r-- | src/main.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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); |
