From: Martin Matuska Date: Sat, 21 Aug 2021 07:07:54 +0000 (+0200) Subject: write_disk_posix: rename variable in check_symlinks_fsobj() X-Git-Tag: v3.5.2~5 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=13023595c9623374cd386c6dd419241fb5082b41;p=thirdparty%2Flibarchive.git write_disk_posix: rename variable in check_symlinks_fsobj() Rename the flag "extracting_hardlink" to "checking_linkname" to be more accurate about its use. If the variable is non-zero it means that check_symlinks_fsobj() is called on the linkname when a hardlink is going to be created. --- diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c index 83a1f6d16..ba4e65df7 100644 --- a/libarchive/archive_write_disk_posix.c +++ b/libarchive/archive_write_disk_posix.c @@ -2680,7 +2680,7 @@ fsobj_error(int *a_eno, struct archive_string *a_estr, */ static int check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, - int flags, int extracting_hardlink) + int flags, int checking_linkname) { #if !defined(HAVE_LSTAT) && \ !(defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT)) @@ -2689,7 +2689,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, (void)error_number; /* UNUSED */ (void)error_string; /* UNUSED */ (void)flags; /* UNUSED */ - (void)extracting_hardlink; /* UNUSED */ + (void)checking_linkname; /* UNUSED */ return (ARCHIVE_OK); #else int res = ARCHIVE_OK; @@ -2811,7 +2811,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, head = tail + 1; } } else if (S_ISLNK(st.st_mode)) { - if (last && extracting_hardlink) { + if (last && checking_linkname) { #ifdef HAVE_LINKAT /* * Hardlinks to symlinks are safe to write