Skip to content

Commit

Permalink
tests: use const char instead of char in two cases
Browse files Browse the repository at this point in the history
Found in test_extract_cpio_absolute_paths.c when compiling FreeBSD base
  • Loading branch information
mmatuska committed Oct 13, 2024
1 parent 971c043 commit c40d79a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpio/test/test_extract_cpio_absolute_paths.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DEFINE_TEST(test_extract_cpio_absolute_paths)
int r;

// Create an absolute path for a test file inside testworkdir.
char *entry_suffix = "/cpio-noabs";
const char *entry_suffix = "/cpio-noabs";
size_t entry_suffix_length = strlen(entry_suffix);
size_t testworkdir_length = strlen(testworkdir);
size_t temp_absolute_file_name_length = testworkdir_length + entry_suffix_length;
Expand Down
2 changes: 1 addition & 1 deletion libarchive/test/test_write_disk_secure_noabsolutepaths.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DEFINE_TEST(test_write_disk_secure_noabsolutepaths)
assertEqualIntA(a, ARCHIVE_OK, archive_write_open_memory(a, buff, sizeof(buff), &used));

// Create an absolute path for a test file inside testworkdir.
char *entry_suffix = "/badfile";
const char *entry_suffix = "/badfile";
size_t entry_suffix_length = strlen(entry_suffix);
size_t testworkdir_length = strlen(testworkdir);
size_t temp_absolute_file_name_length = testworkdir_length + entry_suffix_length;
Expand Down

0 comments on commit c40d79a

Please sign in to comment.